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

Side by Side Diff: build/common.gypi

Issue 1082503002: Use the Clang plugin on Windows. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: It turns out extra nesting does fix gyp problems Created 5 years, 8 months 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
« no previous file with comments | « no previous file | build/config/clang/BUILD.gn » ('j') | 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 # 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 2130 matching lines...) Expand 10 before | Expand all | Expand 10 after
2141 ['enable_resource_whitelist_generation==1 and OS!="win"', { 2141 ['enable_resource_whitelist_generation==1 and OS!="win"', {
2142 'grit_rc_header_format': ['-h', '#define {textual_id} _Pragma("whitelist ed_resource_{numeric_id}") {numeric_id}'], 2142 'grit_rc_header_format': ['-h', '#define {textual_id} _Pragma("whitelist ed_resource_{numeric_id}") {numeric_id}'],
2143 }], 2143 }],
2144 ['enable_resource_whitelist_generation==1 and OS=="win"', { 2144 ['enable_resource_whitelist_generation==1 and OS=="win"', {
2145 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message(" whitelisted_resource_{numeric_id}")) {numeric_id}'], 2145 'grit_rc_header_format': ['-h', '#define {textual_id} __pragma(message(" whitelisted_resource_{numeric_id}")) {numeric_id}'],
2146 }], 2146 }],
2147 ['enable_mdns==1 or OS=="mac"', { 2147 ['enable_mdns==1 or OS=="mac"', {
2148 'grit_defines': ['-D', 'enable_service_discovery'], 2148 'grit_defines': ['-D', 'enable_service_discovery'],
2149 'enable_service_discovery%': 1 2149 'enable_service_discovery%': 1
2150 }], 2150 }],
2151 ['clang_use_chrome_plugins==1 and OS!="win"', { 2151 ['clang_use_chrome_plugins==1', {
2152 'variables': { 2152 'variables': {
2153 'conditions': [ 2153 'conditions': [
2154 ['OS=="mac" or OS=="ios"', { 2154 ['OS!="win"', {
2155 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-bui ld/Release+Asserts/lib/libFindBadConstructs.dylib', 2155 'variables': {
2156 }, { # OS != "mac" or OS != "ios" 2156 'conditions': [
2157 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/llvm-bui ld/Release+Asserts/lib/libFindBadConstructs.so', 2157 ['OS=="mac" or OS=="ios"', {
2158 }], 2158 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/ll vm-build/Release+Asserts/lib/libFindBadConstructs.dylib',
2159 }, { # OS != "mac" or OS != "ios"
2160 'clang_lib_path%': '<!(cd <(DEPTH) && pwd -P)/third_party/ll vm-build/Release+Asserts/lib/libFindBadConstructs.so',
2161 }],
2162 ],
2163 },
2164 'clang_dynlib_flags%': '-Xclang -load -Xclang <(clang_lib_path) ',
2165 }, { # OS == "win"
2166 # On Windows, the plugin is built directly into clang, so there's
2167 # no need to load it dynamically.
2168 'clang_dynlib_flags%': '',
2169 }]
2159 ], 2170 ],
2160 }, 2171 },
2161 # If you change these, also change build/config/clang/BUILD.gn. 2172 # If you change these, also change build/config/clang/BUILD.gn.
2162 'clang_chrome_plugins_flags%': 2173 'clang_chrome_plugins_flags%':
2163 '-Xclang -load -Xclang <(clang_lib_path)' 2174 '<(clang_dynlib_flags)'
2164 ' -Xclang -add-plugin -Xclang find-bad-constructs', 2175 '-Xclang -add-plugin -Xclang find-bad-constructs',
2165 }], 2176 }],
2166 ['asan==1 or msan==1 or lsan==1 or tsan==1', { 2177 ['asan==1 or msan==1 or lsan==1 or tsan==1', {
2167 'clang%': 1, 2178 'clang%': 1,
2168 'use_allocator%': 'none', 2179 'use_allocator%': 'none',
2169 'use_sanitizer_options%': 1, 2180 'use_sanitizer_options%': 1,
2170 # Disable ICF in the linker to avoid debug info loss. 2181 # Disable ICF in the linker to avoid debug info loss.
2171 'gold_icf_level%': 'none', 2182 'gold_icf_level%': 'none',
2172 }], 2183 }],
2173 ['asan==1 and OS=="linux" and chromeos==0', { 2184 ['asan==1 and OS=="linux" and chromeos==0', {
2174 'use_custom_libcxx%': 1, 2185 'use_custom_libcxx%': 1,
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
2207 # 32-bit Clang is unsupported. It may not build. Put your 32-bit 2218 # 32-bit Clang is unsupported. It may not build. Put your 32-bit
2208 # Clang in this directory at your own risk if needed for some 2219 # Clang in this directory at your own risk if needed for some
2209 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory 2220 # purpose (e.g. to compare 32-bit and 64-bit behavior like memory
2210 # usage). Any failure by this compiler should not close the tree. 2221 # usage). Any failure by this compiler should not close the tree.
2211 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32', 2222 'make_clang_dir%': 'third_party/llvm-allocated-type/Linux_ia32',
2212 }], 2223 }],
2213 ], 2224 ],
2214 }], 2225 }],
2215 2226
2216 ['OS=="win"', { 2227 ['OS=="win"', {
2217 # The Clang plugins don't currently work on Windows. 2228 # The Blink GC plugin doesn't currently work on Windows.
2218 # TODO(hans): One day, this will work. (crbug.com/82385) 2229 # TODO(hans): One day, this will work. (crbug.com/82385)
2219 'clang_use_chrome_plugins%': 0, 2230 'blink_gc_plugin%': 0,
2220 }], 2231 }],
2221 2232
2222 # On valgrind bots, override the optimizer settings so we don't inline too 2233 # On valgrind bots, override the optimizer settings so we don't inline too
2223 # much and make the stacks harder to figure out. 2234 # much and make the stacks harder to figure out.
2224 # 2235 #
2225 # TODO(rnk): Kill off variables that no one else uses and just implement 2236 # TODO(rnk): Kill off variables that no one else uses and just implement
2226 # them under a build_for_tool== condition. 2237 # them under a build_for_tool== condition.
2227 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', { 2238 ['build_for_tool=="memcheck" or build_for_tool=="tsan"', {
2228 # gcc flags 2239 # gcc flags
2229 'mac_debug_optimization': '1', 2240 'mac_debug_optimization': '1',
(...skipping 3376 matching lines...) Expand 10 before | Expand all | Expand 10 after
5606 }, 5617 },
5607 }], 5618 }],
5608 ['clang==1 and target_arch=="ia32"', { 5619 ['clang==1 and target_arch=="ia32"', {
5609 'VCCLCompilerTool': { 5620 'VCCLCompilerTool': {
5610 'WarnAsError': 'false', 5621 'WarnAsError': 'false',
5611 'AdditionalOptions': [ 5622 'AdditionalOptions': [
5612 '/fallback', 5623 '/fallback',
5613 ], 5624 ],
5614 }, 5625 },
5615 }], 5626 }],
5627 ['clang==1 and clang_use_chrome_plugins==1', {
5628 'VCCLCompilerTool': {
5629 'AdditionalOptions': [
5630 '<@(clang_chrome_plugins_flags)',
5631 ],
5632 },
5633 }],
5616 ], 5634 ],
5617 }, 5635 },
5618 }, 5636 },
5619 }], 5637 }],
5620 ['disable_nacl==1', { 5638 ['disable_nacl==1', {
5621 'target_defaults': { 5639 'target_defaults': {
5622 'defines': [ 5640 'defines': [
5623 'DISABLE_NACL', 5641 'DISABLE_NACL',
5624 ], 5642 ],
5625 }, 5643 },
(...skipping 458 matching lines...) Expand 10 before | Expand all | Expand 10 after
6084 # settings in target dicts. SYMROOT is a special case, because many other 6102 # settings in target dicts. SYMROOT is a special case, because many other
6085 # Xcode variables depend on it, including variables such as 6103 # Xcode variables depend on it, including variables such as
6086 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 6104 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
6087 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 6105 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
6088 # files to appear (when present) in the UI as actual files and not red 6106 # files to appear (when present) in the UI as actual files and not red
6089 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 6107 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
6090 # and therefore SYMROOT, needs to be set at the project level. 6108 # and therefore SYMROOT, needs to be set at the project level.
6091 'SYMROOT': '<(DEPTH)/xcodebuild', 6109 'SYMROOT': '<(DEPTH)/xcodebuild',
6092 }, 6110 },
6093 } 6111 }
OLDNEW
« no previous file with comments | « no previous file | build/config/clang/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698