Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(764)

Side by Side Diff: sdch/sdch.gyp

Issue 68253006: Remove static initializers introduced by open-vcdiff's logging.h. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: tweak Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« sdch/logging_forward.h ('K') | « sdch/logging_forward.h ('k') | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 { 5 {
6 'variables': { 6 'variables': {
7 'chromium_code': 1, 7 'chromium_code': 1,
8 }, 8 },
9 'targets': [ 9 'targets': [
10 { 10 {
11 'target_name': 'sdch', 11 'target_name': 'sdch',
12 'type': 'static_library', 12 'type': 'static_library',
13 'dependencies': [ 13 'dependencies': [
14 '../third_party/zlib/zlib.gyp:zlib', 14 '../third_party/zlib/zlib.gyp:zlib',
15 ], 15 ],
16 'sources': [ 16 'sources': [
17 'logging_forward.h',
17 'open-vcdiff/src/addrcache.cc', 18 'open-vcdiff/src/addrcache.cc',
18 'open-vcdiff/src/blockhash.cc', 19 'open-vcdiff/src/blockhash.cc',
19 'open-vcdiff/src/blockhash.h', 20 'open-vcdiff/src/blockhash.h',
20 'open-vcdiff/src/checksum.h', 21 'open-vcdiff/src/checksum.h',
21 'open-vcdiff/src/codetable.cc', 22 'open-vcdiff/src/codetable.cc',
22 'open-vcdiff/src/codetable.h', 23 'open-vcdiff/src/codetable.h',
23 'open-vcdiff/src/compile_assert.h', 24 'open-vcdiff/src/compile_assert.h',
24 'open-vcdiff/src/decodetable.cc', 25 'open-vcdiff/src/decodetable.cc',
25 'open-vcdiff/src/decodetable.h', 26 'open-vcdiff/src/decodetable.h',
26 'open-vcdiff/src/encodetable.cc', 27 'open-vcdiff/src/encodetable.cc',
27 'open-vcdiff/src/encodetable.h', 28 'open-vcdiff/src/encodetable.h',
28 'open-vcdiff/src/google/output_string.h', 29 'open-vcdiff/src/google/output_string.h',
29 'open-vcdiff/src/google/vcdecoder.h', 30 'open-vcdiff/src/google/vcdecoder.h',
30 'open-vcdiff/src/headerparser.cc', 31 'open-vcdiff/src/headerparser.cc',
31 'open-vcdiff/src/headerparser.h', 32 'open-vcdiff/src/headerparser.h',
32 'open-vcdiff/src/instruction_map.cc', 33 'open-vcdiff/src/instruction_map.cc',
33 'open-vcdiff/src/instruction_map.h', 34 'open-vcdiff/src/instruction_map.h',
34 'open-vcdiff/src/logging.cc',
35 'open-vcdiff/src/logging.h',
36 'open-vcdiff/src/rolling_hash.h', 35 'open-vcdiff/src/rolling_hash.h',
37 'open-vcdiff/src/testing.h', 36 'open-vcdiff/src/testing.h',
38 'open-vcdiff/src/varint_bigendian.cc', 37 'open-vcdiff/src/varint_bigendian.cc',
39 'open-vcdiff/src/varint_bigendian.h', 38 'open-vcdiff/src/varint_bigendian.h',
40 'open-vcdiff/src/vcdecoder.cc', 39 'open-vcdiff/src/vcdecoder.cc',
41 'open-vcdiff/src/vcdiff_defs.h', 40 'open-vcdiff/src/vcdiff_defs.h',
42 'open-vcdiff/src/vcdiffengine.cc', 41 'open-vcdiff/src/vcdiffengine.cc',
43 'open-vcdiff/src/vcdiffengine.h', 42 'open-vcdiff/src/vcdiffengine.h',
44 'open-vcdiff/vsprojects/config.h', 43 'open-vcdiff/vsprojects/config.h',
45 'open-vcdiff/vsprojects/stdint.h', 44 'open-vcdiff/vsprojects/stdint.h',
46 ], 45 ],
47 'include_dirs': [ 46 'include_dirs': [
48 'open-vcdiff/src', 47 'open-vcdiff/src',
48 '..',
49 ], 49 ],
50 'direct_dependent_settings': { 50 'direct_dependent_settings': {
51 'include_dirs': [ 51 'include_dirs': [
52 'open-vcdiff/src', 52 'open-vcdiff/src',
53 ], 53 ],
54 }, 54 },
55 'conditions': [ 55 'conditions': [
56 [ 'OS == "linux" or OS == "android"', { 'include_dirs': [ 'linux' ] } ], 56 [ 'OS == "linux" or OS == "android"', { 'include_dirs': [ 'linux' ] } ],
57 [ 'os_bsd==1 or OS=="solaris"', { 'include_dirs': [ 'bsd' ] } ], 57 [ 'os_bsd==1 or OS=="solaris"', { 'include_dirs': [ 'bsd' ] } ],
58 [ 'OS == "ios"', { 'include_dirs': [ 'ios' ] } ], 58 [ 'OS == "ios"', { 'include_dirs': [ 'ios' ] } ],
59 [ 'OS == "mac"', { 'include_dirs': [ 'mac' ] } ], 59 [ 'OS == "mac"', { 'include_dirs': [ 'mac' ] } ],
60 [ 'OS == "win"', { 'include_dirs': [ 'open-vcdiff/vsprojects' ] } ], 60 [ 'OS == "win"', { 'include_dirs': [ 'open-vcdiff/vsprojects' ] } ],
61 ], 61 ],
62 # open-vcdiff's logging.h introduces static initializers. This was
63 # reported upstream years ago (
64 # https://code.google.com/p/open-vcdiff/issues/detail?id=33 ). Since
65 # upstream won't fix this, work around it on the chromium side: Define
66 # the header guard so that open-vcdiff's logging.h doesn't get used, and
wtc 2013/11/12 18:14:03 Remove "Define the header guard so that open-vcdif
Nico 2013/11/12 18:34:42 Done.
67 # inject a header that forwards to base/logging.h instead (which doesn't
68 # introduce static initializers).
69 'variables': {
70 'logging_path': 'logging_forward.h',
71 'conditions': [
72 # gyp leaves unspecified what the cwd is when running the compiler,
73 # and gyp/linux doesn't have a built-in way for forcing an include.
74 # So hardcode the base directory. If this spreads, provide native
75 # support in gyp, like we have for gyp/mac and gyp/windows.
76 # path.
77 ['"<(GENERATOR)"=="ninja"', { 'logging_dir': '../..' },
78 { 'logging_dir': '.' }
79 ],
80 ],
81 },
82 # GCC_PREFIX_HEADER is relative to the current directory,
83 # ForcedIncludeFiles is relative to include_dirs, cflags relative to the
84 # build directory.
85 'xcode_settings': { 'GCC_PREFIX_HEADER': '<(logging_path)' },
86 'msvs_settings': {
87 'VCCLCompilerTool': { 'ForcedIncludeFiles': [ 'sdch/<(logging_path)' ] }
88 },
89 'cflags': [ '-include', '<(logging_dir)/sdch/<(logging_path)' ],
62 }, 90 },
63 ], 91 ],
64 } 92 }
OLDNEW
« sdch/logging_forward.h ('K') | « sdch/logging_forward.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698