Chromium Code Reviews| OLD | NEW |
|---|---|
| 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 # IMPORTANT: | 5 # IMPORTANT: |
| 6 # Please don't directly include this file if you are building via gyp_chromium, | 6 # Please don't directly include this file if you are building via gyp_chromium, |
| 7 # since gyp_chromium is automatically forcing its inclusion. | 7 # since gyp_chromium is automatically forcing its inclusion. |
| 8 { | 8 { |
| 9 # Variables expected to be overriden on the GYP command line (-D) or by | 9 # Variables expected to be overriden on the GYP command line (-D) or by |
| 10 # ~/.gyp/include.gypi. | 10 # ~/.gyp/include.gypi. |
| (...skipping 2156 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2167 ['enable_resource_whitelist_generation==1 and OS!="win"', { | 2167 ['enable_resource_whitelist_generation==1 and OS!="win"', { |
| 2168 'grit_rc_header_format': ['-h', '#define {textual_id} _Pragma("whitelist ed_resource_{numeric_id}") {numeric_id}'], | 2168 'grit_rc_header_format': ['-h', '#define {textual_id} _Pragma("whitelist ed_resource_{numeric_id}") {numeric_id}'], |
| 2169 }], | 2169 }], |
| 2170 ['enable_resource_whitelist_generation==1 and OS=="win"', { | 2170 ['enable_resource_whitelist_generation==1 and OS=="win"', { |
| 2171 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message(" whitelisted_resource_{numeric_id}")) {numeric_id}'], | 2171 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message(" whitelisted_resource_{numeric_id}")) {numeric_id}'], |
| 2172 }], | 2172 }], |
| 2173 ['enable_mdns==1 or OS=="mac"', { | 2173 ['enable_mdns==1 or OS=="mac"', { |
| 2174 'grit_defines': ['-D', 'enable_service_discovery'], | 2174 'grit_defines': ['-D', 'enable_service_discovery'], |
| 2175 'enable_service_discovery%': 1 | 2175 'enable_service_discovery%': 1 |
| 2176 }], | 2176 }], |
| 2177 ['clang_use_chrome_plugins==1 and OS!="win"', { | 2177 ['clang_use_chrome_plugins==1', { |
| 2178 'variables': { | 2178 'variables': { |
| 2179 'conditions': [ | 2179 'conditions': [ |
| 2180 ['OS=="mac" or OS=="ios"', { | 2180 ['OS!="win"', { |
| 2181 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-bui ld/Release+Asserts/lib/libFindBadConstructs.dylib', | 2181 'conditions': [ |
| 2182 }, { # OS != "mac" or OS != "ios" | 2182 ['OS=="mac" or OS=="ios"', { |
| 2183 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-bui ld/Release+Asserts/lib/libFindBadConstructs.so', | 2183 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm -build/Release+Asserts/lib/libFindBadConstructs.dylib', |
| 2184 }], | 2184 }, { # OS != "mac" or OS != "ios" |
| 2185 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm -build/Release+Asserts/lib/libFindBadConstructs.so', | |
| 2186 }], | |
| 2187 ], | |
| 2188 'clang_dynlib_flags%': '-Xclang -load -Xclang <(clang_lib_path) ', | |
| 2189 }, { # OS == "win" | |
| 2190 'clang_dynlib_flags%': '', | |
|
hans
2015/04/11 12:00:30
Probably worth a comment that the plugins are link
dcheng
2015/04/11 19:27:24
Yeah, that's a good idea. Done.
| |
| 2191 }] | |
| 2185 ], | 2192 ], |
| 2186 }, | 2193 }, |
| 2187 # If you change these, also change build/config/clang/BUILD.gn. | 2194 # If you change these, also change build/config/clang/BUILD.gn. |
| 2188 'clang_chrome_plugins_flags%': | 2195 'clang_chrome_plugins_flags%': |
| 2189 '-Xclang -load -Xclang <(clang_lib_path)' | 2196 '<(clang_dynlib_flags)' |
| 2190 ' -Xclang -add-plugin -Xclang find-bad-constructs', | 2197 '-Xclang -add-plugin -Xclang find-bad-constructs', |
| 2191 }], | 2198 }], |
| 2192 ['asan==1 or msan==1 or lsan==1 or tsan==1', { | 2199 ['asan==1 or msan==1 or lsan==1 or tsan==1', { |
| 2193 'clang%': 1, | 2200 'clang%': 1, |
| 2194 'use_allocator%': 'none', | 2201 'use_allocator%': 'none', |
| 2195 'use_sanitizer_options%': 1, | 2202 'use_sanitizer_options%': 1, |
| 2196 # Disable ICF in the linker to avoid debug info loss. | 2203 # Disable ICF in the linker to avoid debug info loss. |
| 2197 'gold_icf_level%': 'none', | 2204 'gold_icf_level%': 'none', |
| 2198 }], | 2205 }], |
| 2199 ['asan==1 and OS=="linux" and chromeos==0', { | 2206 ['asan==1 and OS=="linux" and chromeos==0', { |
| 2200 'use_custom_libcxx%': 1, | 2207 'use_custom_libcxx%': 1, |
| (...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 2233 # 32-bit Clang is unsupported. It may not build. Put your 32-bit | 2240 # 32-bit Clang is unsupported. It may not build. Put your 32-bit |
| 2234 # Clang in this directory at your own risk if needed for some | 2241 # Clang in this directory at your own risk if needed for some |
| 2235 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory | 2242 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory |
| 2236 # usage). Any failure by this compiler should not close the tree. | 2243 # usage). Any failure by this compiler should not close the tree. |
| 2237 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32', | 2244 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32', |
| 2238 }], | 2245 }], |
| 2239 ], | 2246 ], |
| 2240 }], | 2247 }], |
| 2241 | 2248 |
| 2242 ['OS=="win"', { | 2249 ['OS=="win"', { |
| 2243 # The Clang plugins don't currently work on Windows. | 2250 # The Blink GC plugin doesn't currently work on Windows. |
| 2244 # TODO(hans): One day, this will work. (crbug.com/82385) | 2251 # TODO(hans): One day, this will work. (crbug.com/82385) |
| 2245 'clang_use_chrome_plugins%': 0, | 2252 'blink_gc_plugin%': 0, |
| 2246 }], | 2253 }], |
| 2247 | 2254 |
| 2248 # On valgrind bots, override the optimizer settings so we don't inline too | 2255 # On valgrind bots, override the optimizer settings so we don't inline too |
| 2249 # much and make the stacks harder to figure out. | 2256 # much and make the stacks harder to figure out. |
| 2250 # | 2257 # |
| 2251 # TODO(rnk): Kill off variables that no one else uses and just implement | 2258 # TODO(rnk): Kill off variables that no one else uses and just implement |
| 2252 # them under a build_for_tool== condition. | 2259 # them under a build_for_tool== condition. |
| 2253 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { | 2260 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { |
| 2254 # gcc flags | 2261 # gcc flags |
| 2255 'mac_debug_optimization': '1', | 2262 'mac_debug_optimization': '1', |
| (...skipping 3369 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5625 }, | 5632 }, |
| 5626 }], | 5633 }], |
| 5627 ['clang==1 and target_arch=="ia32"', { | 5634 ['clang==1 and target_arch=="ia32"', { |
| 5628 'VCCLCompilerTool': { | 5635 'VCCLCompilerTool': { |
| 5629 'WarnAsError': 'false', | 5636 'WarnAsError': 'false', |
| 5630 'AdditionalOptions': [ | 5637 'AdditionalOptions': [ |
| 5631 '/fallback', | 5638 '/fallback', |
| 5632 ], | 5639 ], |
| 5633 }, | 5640 }, |
| 5634 }], | 5641 }], |
| 5642 ['clang==1 and clang_use_chrome_plugins==1', { | |
| 5643 'VCCLCompilerTool': { | |
| 5644 'AdditionalOptions': [ | |
| 5645 '<@(clang_chrome_plugins_flags)', | |
| 5646 ], | |
| 5647 }, | |
| 5648 }], | |
| 5635 ], | 5649 ], |
| 5636 }, | 5650 }, |
| 5637 }, | 5651 }, |
| 5638 }], | 5652 }], |
| 5639 ['disable_nacl==1', { | 5653 ['disable_nacl==1', { |
| 5640 'target_defaults': { | 5654 'target_defaults': { |
| 5641 'defines': [ | 5655 'defines': [ |
| 5642 'DISABLE_NACL', | 5656 'DISABLE_NACL', |
| 5643 ], | 5657 ], |
| 5644 }, | 5658 }, |
| (...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 6103 # settings in target dicts. SYMROOT is a special case, because many other | 6117 # settings in target dicts. SYMROOT is a special case, because many other |
| 6104 # Xcode variables depend on it, including variables such as | 6118 # Xcode variables depend on it, including variables such as |
| 6105 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 6119 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 6106 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 6120 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 6107 # files to appear (when present) in the UI as actual files and not red | 6121 # files to appear (when present) in the UI as actual files and not red |
| 6108 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 6122 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 6109 # and therefore SYMROOT, needs to be set at the project level. | 6123 # and therefore SYMROOT, needs to be set at the project level. |
| 6110 'SYMROOT': '<(DEPTH)/xcodebuild', | 6124 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 6111 }, | 6125 }, |
| 6112 } | 6126 } |
| OLD | NEW |