summaryrefslogtreecommitdiffstats
path: root/sdch
diff options
context:
space:
mode:
authorbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-02 17:40:30 +0000
committerbrettw@chromium.org <brettw@chromium.org@0039d316-1c4b-4281-b951-d872f2087c98>2014-06-02 17:40:30 +0000
commitc7e9f494f13a1e82668141a79412fec1ac2915ec (patch)
tree35c6a093c7e5b248531f8249fba3ffa68de9faa2 /sdch
parent77dc057b6fe995fd092d79039faf38d333acc956 (diff)
downloadchromium_src-c7e9f494f13a1e82668141a79412fec1ac2915ec.zip
chromium_src-c7e9f494f13a1e82668141a79412fec1ac2915ec.tar.gz
chromium_src-c7e9f494f13a1e82668141a79412fec1ac2915ec.tar.bz2
Add GN build file for src/sdch
BUG= R=mark@chromium.org Review URL: https://codereview.chromium.org/308123006 git-svn-id: svn://svn.chromium.org/chrome/trunk/src@274271 0039d316-1c4b-4281-b951-d872f2087c98
Diffstat (limited to 'sdch')
-rw-r--r--sdch/BUILD.gn78
1 files changed, 78 insertions, 0 deletions
diff --git a/sdch/BUILD.gn b/sdch/BUILD.gn
new file mode 100644
index 0000000..24af3a4
--- /dev/null
+++ b/sdch/BUILD.gn
@@ -0,0 +1,78 @@
+# Copyright 2014 The Chromium Authors. All rights reserved.
+# Use of this source code is governed by a BSD-style license that can be
+# found in the LICENSE file.
+
+config("sdch_config") {
+ include_dirs = [ "open-vcdiff/src" ]
+}
+
+static_library("sdch") {
+ sources = [
+ "logging_forward.h",
+ "open-vcdiff/src/addrcache.cc",
+ "open-vcdiff/src/blockhash.cc",
+ "open-vcdiff/src/blockhash.h",
+ "open-vcdiff/src/checksum.h",
+ "open-vcdiff/src/codetable.cc",
+ "open-vcdiff/src/codetable.h",
+ "open-vcdiff/src/compile_assert.h",
+ "open-vcdiff/src/decodetable.cc",
+ "open-vcdiff/src/decodetable.h",
+ "open-vcdiff/src/encodetable.cc",
+ "open-vcdiff/src/encodetable.h",
+ "open-vcdiff/src/google/output_string.h",
+ "open-vcdiff/src/google/vcdecoder.h",
+ "open-vcdiff/src/headerparser.cc",
+ "open-vcdiff/src/headerparser.h",
+ "open-vcdiff/src/instruction_map.cc",
+ "open-vcdiff/src/instruction_map.h",
+ "open-vcdiff/src/rolling_hash.h",
+ "open-vcdiff/src/testing.h",
+ "open-vcdiff/src/varint_bigendian.cc",
+ "open-vcdiff/src/varint_bigendian.h",
+ "open-vcdiff/src/vcdecoder.cc",
+ "open-vcdiff/src/vcdiff_defs.h",
+ "open-vcdiff/src/vcdiffengine.cc",
+ "open-vcdiff/src/vcdiffengine.h",
+ "open-vcdiff/vsprojects/config.h",
+ "open-vcdiff/vsprojects/stdint.h",
+ ]
+
+ direct_dependent_configs = [ ":sdch_config" ]
+
+ deps = [
+ "//base",
+ "//third_party/zlib",
+ ]
+
+ if (is_linux || is_android) {
+ include_dirs = [ "linux" ]
+ } else if (is_ios) {
+ include_dirs = [ "ios" ]
+ } else if (is_mac) {
+ include_dirs = [ "mac" ]
+ } else if (is_win) {
+ include_dirs = [ "win" ]
+ }
+
+ # open-vcdiff's logging.h introduces static initializers. This was
+ # reported upstream years ago (
+ # https://code.google.com/p/open-vcdiff/issues/detail?id=33 ). Since
+ # upstream won't fix this, work around it on the chromium side:
+ # Inject a header that forwards to base/logging.h instead (which doesn't
+ # introduce static initializers, and which prevents open-vcdiff's
+ # logging.h from being used).
+ logging_file = rebase_path("logging_forward.h", root_build_dir)
+ if (is_win) {
+ cflags = [
+ "/FI", rebase_path("//build/intsafe_workaround.h", root_build_dir),
+ "/FI", logging_file,
+ ]
+ } else {
+ cflags = [ "-include", logging_file ]
+ if (is_linux) {
+ # TODO(mostynb): remove this if open-vcdiff is ever updated for c++11:
+ cflags += [ "-Wno-deprecated-declarations" ]
+ }
+ }
+}