Commit 377a0f0f authored by Benoît Lizé's avatar Benoît Lizé Committed by Commit Bot

third_party/brotli: Split out the encoder target in BUILD.gn.

Bug: 907489
Change-Id: Ia66d652b30fbaba67035e042a2144adc3727c582
Reviewed-on: https://chromium-review.googlesource.com/c/1347282
Commit-Queue: Benoit L <lizeb@chromium.org>
Reviewed-by: default avatarKenichi Ishibashi <bashi@chromium.org>
Cr-Commit-Position: refs/heads/master@{#611121}
parent f0914305
......@@ -60,6 +60,69 @@ dec_sources = [
"dec/state.h",
]
enc_sources = [
"enc/backward_references.c",
"enc/backward_references.h",
"enc/backward_references_hq.c",
"enc/backward_references_hq.h",
"enc/backward_references_inc.h",
"enc/bit_cost.c",
"enc/bit_cost.h",
"enc/bit_cost_inc.h",
"enc/block_encoder_inc.h",
"enc/block_splitter.c",
"enc/block_splitter.h",
"enc/block_splitter_inc.h",
"enc/brotli_bit_stream.c",
"enc/brotli_bit_stream.h",
"enc/cluster.c",
"enc/cluster.h",
"enc/cluster_inc.h",
"enc/command.h",
"enc/compress_fragment.c",
"enc/compress_fragment.h",
"enc/compress_fragment_two_pass.c",
"enc/compress_fragment_two_pass.h",
"enc/dictionary_hash.c",
"enc/dictionary_hash.h",
"enc/encode.c",
"enc/encoder_dict.c",
"enc/encoder_dict.h",
"enc/entropy_encode.c",
"enc/entropy_encode.h",
"enc/entropy_encode_static.h",
"enc/fast_log.h",
"enc/find_match_length.h",
"enc/hash.h",
"enc/hash_composite_inc.h",
"enc/hash_forgetful_chain_inc.h",
"enc/hash_longest_match64_inc.h",
"enc/hash_longest_match_inc.h",
"enc/hash_longest_match_quickly_inc.h",
"enc/hash_rolling_inc.h",
"enc/hash_to_binary_tree_inc.h",
"enc/histogram.c",
"enc/histogram.h",
"enc/histogram_inc.h",
"enc/literal_cost.c",
"enc/literal_cost.h",
"enc/memory.c",
"enc/memory.h",
"enc/metablock.c",
"enc/metablock.h",
"enc/metablock_inc.h",
"enc/params.h",
"enc/prefix.h",
"enc/quality.h",
"enc/ringbuffer.h",
"enc/static_dict.c",
"enc/static_dict.h",
"enc/static_dict_lut.h",
"enc/utf8_util.c",
"enc/utf8_util.h",
"enc/write_bits.h",
]
static_library("dec") {
sources = dec_sources
public_configs = [ ":includes" ]
......@@ -96,69 +159,28 @@ static_library("dec_no_dictionary_data") {
configs += [ "//build/config/compiler:optimize_max" ]
}
static_library("enc") {
sources = enc_sources
public_configs = [ ":includes" ]
public_deps = [
":headers",
]
deps = [
":common",
]
configs -= [ "//build/config/compiler:chromium_code" ]
configs += [ "//build/config/compiler:no_chromium_code" ]
# Since we never debug brotli, freeze the optimizations to -O2.
configs -= [ "//build/config/compiler:default_optimization" ]
configs += [ "//build/config/compiler:optimize_max" ]
}
if (current_toolchain == host_toolchain) {
executable("brotli") {
sources = [
"enc/backward_references.c",
"enc/backward_references.h",
"enc/backward_references_hq.c",
"enc/backward_references_hq.h",
"enc/backward_references_inc.h",
"enc/bit_cost.c",
"enc/bit_cost.h",
"enc/bit_cost_inc.h",
"enc/block_encoder_inc.h",
"enc/block_splitter.c",
"enc/block_splitter.h",
"enc/block_splitter_inc.h",
"enc/brotli_bit_stream.c",
"enc/brotli_bit_stream.h",
"enc/cluster.c",
"enc/cluster.h",
"enc/cluster_inc.h",
"enc/command.h",
"enc/compress_fragment.c",
"enc/compress_fragment.h",
"enc/compress_fragment_two_pass.c",
"enc/compress_fragment_two_pass.h",
"enc/dictionary_hash.c",
"enc/dictionary_hash.h",
"enc/encode.c",
"enc/encoder_dict.c",
"enc/encoder_dict.h",
"enc/entropy_encode.c",
"enc/entropy_encode.h",
"enc/entropy_encode_static.h",
"enc/fast_log.h",
"enc/find_match_length.h",
"enc/hash.h",
"enc/hash_composite_inc.h",
"enc/hash_forgetful_chain_inc.h",
"enc/hash_longest_match64_inc.h",
"enc/hash_longest_match_inc.h",
"enc/hash_longest_match_quickly_inc.h",
"enc/hash_rolling_inc.h",
"enc/hash_to_binary_tree_inc.h",
"enc/histogram.c",
"enc/histogram.h",
"enc/histogram_inc.h",
"enc/literal_cost.c",
"enc/literal_cost.h",
"enc/memory.c",
"enc/memory.h",
"enc/metablock.c",
"enc/metablock.h",
"enc/metablock_inc.h",
"enc/params.h",
"enc/prefix.h",
"enc/quality.h",
"enc/ringbuffer.h",
"enc/static_dict.c",
"enc/static_dict.h",
"enc/static_dict_lut.h",
"enc/utf8_util.c",
"enc/utf8_util.h",
"enc/write_bits.h",
"tools/brotli.c",
]
public_configs = [ ":includes" ]
......@@ -166,6 +188,7 @@ if (current_toolchain == host_toolchain) {
deps = [
":common",
":dec",
":enc",
":headers",
"//build/win:default_exe_manifest",
]
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment