Commit Graph

25 Commits

Author SHA1 Message Date
Felix Hanau
534076fa67
Add support for clang-cl compiler (#1021) 2023-07-03 11:43:35 +02:00
Eugene Kliuchnikov
68f1b90ad0
Update (#918)
Prepare to use copybara worklow.
2021-08-18 19:15:07 +02:00
Dmitry Rozhkov
0cd2e3926e
Fix MSVC linker error (#840)
The -lm linker option is not known to MSVC and setting it triggers
errors in some build systems:

  [6,366 / 6,367] Linking source/exe/envoy-static.exe; 11s remote
  LINK : warning LNK4044: unrecognized option '/lm'; ignored
  LINK : error LNK1218: warning treated as error; no output file generated
  ERROR: C:/source/source/exe/BUILD:22:16: Linking of rule
    '//source/exe:envoy-static' failed (Exit 4044): link.exe failed: error
    executing command

Do not set -lm in case of MSVC.
2020-09-08 16:48:31 +02:00
Eugene Kliuchnikov
40f0fdcdc1
Explicitly mark tests/testdata/* as binary. (#761)
Fixes #760

Drive-by:
 * update go_rules
 * modernize brotli_inc
 * fix wrapper build
 * update PY to 3 in Travis / OSX / Bazel build
 * upgrade JS Bazel rules.
2019-07-16 17:49:14 +02:00
Eugene Kliuchnikov
4b2b2d4f83
Update (#749)
Update:

 * Bazel: fix MSVC configuration
 * C: common: extended documentation and helpers around distance codes
 * C: common: enable BROTLI_DCHECK in "debug" builds
 * C: common: fix implicit trailing zero in `kPrefixSuffix`
 * C: dec: fix possible bit reader discharge for "large-window" mode
 * C: dec: simplify distance decoding via lookup table
 * C: dec: reuse decoder state members memory via union with lookup table
 * C: dec: add decoder state diagram
 * C: enc: clarify access to static dictionary
 * C: enc: improve static dictionary hash
 * C: enc: add "stream offset" parameter for parallel encoding
 * C: enc: reorganize hasher; now Q2-Q3 require exactly 256KiB
           to avoid global TCMalloc lock
 * C: enc: fix rare access to uninitialized data in ring-buffer
 * C: enc: reorganize logging / checks in `write_bits.h`
 * Java: dec: add "large-window" support
 * Java: dec: improve speed
 * Java: dec: debug and 32-bit mode are now activated via system properties
 * Java: dec: demystify some state variables (use better names)
 * Dictionary generator: add single input mode
 * Java: dec: modernize tests
 * Bazel: js: pick working commit for closure rules
2019-04-12 13:57:42 +02:00
Eugene Kliuchnikov
1e7ea1d8e6
Inverse bazel project/workspace tree (#677)
* Inverse bazel workspace tree.

Now each subproject directly depends on root (c) project.

This helps to mitigate Bazel bug bazelbuild/bazel#2391; short summary:
Bazel does not work if referenced subproject `WORKSPACE` uses any
repositories that embedding project does not.

Bright side: building C project is much faster;
no need to download closure, go and JDK...
2018-06-04 17:53:16 +02:00
Eugene Kliuchnikov
c6333e1e79
Fix MSVC compilation (#657)
* tell bazel not to pass strict options to a fancy compiler
 * fix signed-unsigned comparison warning found by MSVC
2018-03-29 10:37:07 +02:00
Eugene Kliuchnikov
0f3c84e745
Update (#656)
* proper fix for the "fall through" warning"
 * automatic NDIRECT/NPOSTFIX tuning (better compression)
 * fix unaligned access for `aarch64`-cross-`armhf` build
 * fix `aarch64` detection (10% decoder speedup)
 * expose `large_window` CLI option
 * make default window size 16MiB
 * ramp up version to 1.0.4
2018-03-27 22:29:22 +02:00
Eugene Kliuchnikov
631fe194a1
Update (#651)
* fix `bazel` build (ignore switch case fall-through)
* add `NPOSTFIX` / `NDIRECT` encoder parameters
* fix source file lists (add `params.h`)
* fix bug in `durchschlag`
* print clarifying messages wheb CLI argument parsing fails
2018-03-20 17:37:41 +06:00
Eugene Kliuchnikov
9c75a2a26a Use bazel in appveyor (#612)
+publish jni dll
2017-10-11 22:26:37 +02:00
Eugene Kliuchnikov
42d78807bb Improve Bazel/JNI portability (#611)
* Improve Bazel/JNI portability
* Update go and closure bazel addons
2017-10-09 17:07:34 +02:00
Eugene Kliuchnikov
19dc934e39 Add JNI wrappers. (#556) 2017-06-01 13:51:18 +02:00
Eugene Kliuchnikov
03739d2b11 Update (#555)
Update:
 * new CLI; bro -> brotli; + man page
 * JNI wrappers preparation (for bazel build)
 * add raw binary dictionary representation `dictionary.bin`
 * add ability to side-load brotli RFC dictionary
 * decoder persists last error now
 * fix `BrotliDecoderDecompress` documentation
 * go reader don't block until necessary
 * more consistent bazel target names
 * Java dictionary data compiled footprint reduced
 * Java tests refactoring
2017-05-29 17:55:14 +02:00
Eugene Kliuchnikov
6ece1d8791 Move files & update paths (#541)
* Move files & update paths

* Rename build to scripts.

* Fix paths

* Fix script.
2017-04-23 14:07:08 +02:00
Eugene Kliuchnikov
a657d9969d Add go wrapper, streamline java decoder: (#524)
* add (c)brotli golang wrapper
 * remove (language-specific) enums in java decoder
2017-03-22 12:41:19 +01:00
Frédéric Wang
ed2748abbf Remove the underscore in the name of brotli libraries. #326 2016-10-12 18:24:04 +02:00
Piotr Sikora
b4f8c7814a Bazel: link ":brotli_enc" with -lm.
While this isn't strictly necessary with recent versions of Bazel
(which unconditionally add -lm to linkopts), building Brotli with
older versions of Bazel requires -lm to be added explicitly.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2016-08-29 02:32:12 -07:00
Eugene Kliuchnikov
e7f47b9470 Merge pull request #418 from PiotrSikora/bazel_cc_library
Bazel: use cc_library instead of cc_inc_library.
2016-08-24 11:54:07 +02:00
Piotr Sikora
d0391c99ee Bazel: export LICENSE file.
Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2016-08-23 19:58:51 -07:00
Piotr Sikora
2cc33230f4 Bazel: use cc_library instead of cc_inc_library.
cc_inc_library is broken when used with external repositories
(see: https://github.com/bazelbuild/bazel/issues/1596), which
makes it a bit useless at the moment.

Switch to using cc_library with "includes" attribute to expose
public headers.

While there, fix order of attributes in ":brotli_common" target.

Signed-off-by: Piotr Sikora <piotrsikora@google.com>
2016-08-23 15:43:07 -07:00
Eugene Kliuchnikov
8148001158 Move "public" to "include/brotli" 2016-08-23 14:40:33 +02:00
Eugene Kliuchnikov
801f5f37ee * rename macros with preceding underscore
* add Brotli*TakeOutput methods
* * flushing now doesn't require additional call
* add Brotli*Version methods
* moved public headers to 'public' directory
* removed C++ API
* do not assume STDC_VERSION is defined
2016-08-22 13:28:22 +02:00
Evgenii Kliuchnikov
52ff81717b Update build systems 2016-06-24 15:32:51 +02:00
Eugene Kliuchnikov
b32cefe160 Fix VS build problems:
* rename build -> buildfiles to avoid clashing with BUILD
* set binary mode for stdin/out in bro
* convert bro to C
2016-06-17 16:24:51 +02:00
Eugene Kliuchnikov
378485b097 Update build system. Now libraries are produced as build artifacts.
There are currently 3 ways to build:
* Easy: `./configure; make`
* Simple: use Bazel
* Portable: use premake5 to generate XCode / MSVS projects
2016-06-16 10:52:57 +02:00