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 1995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2006 # Disable hang reporting for syzyasan builds. | 2006 # Disable hang reporting for syzyasan builds. |
2007 ['syzyasan==1', { | 2007 ['syzyasan==1', { |
2008 # Note: override. | 2008 # Note: override. |
2009 'kasko_hang_reports': 0, | 2009 'kasko_hang_reports': 0, |
2010 'kasko_failed_rdv_reports': 0, | 2010 'kasko_failed_rdv_reports': 0, |
2011 }], | 2011 }], |
2012 # Enable the Kasko reporter for syzyasan builds and hang reporting. | 2012 # Enable the Kasko reporter for syzyasan builds and hang reporting. |
2013 ['syzyasan==1 or kasko_hang_reports==1 or kasko_failed_rdv_reports==1' , { | 2013 ['syzyasan==1 or kasko_hang_reports==1 or kasko_failed_rdv_reports==1' , { |
2014 'kasko': 1, | 2014 'kasko': 1, |
2015 }], | 2015 }], |
2016 ['component=="shared_library" and "<(GENERATOR)"=="ninja"', { | 2016 ['component=="shared_library"', { |
2017 # Only enabled by default for ninja because it's buggy in VS. | |
rohitrao (ping after 24h)
2016/06/13 16:16:50
We no longer need this VS-specific fix?
| |
2018 # Not enabled for component=static_library because some targets | 2017 # Not enabled for component=static_library because some targets |
2019 # are too large and the toolchain fails due to the size of the | 2018 # are too large and the toolchain fails due to the size of the |
2020 # .obj files. | 2019 # .obj files. |
2021 'incremental_chrome_dll%': 1, | 2020 'incremental_chrome_dll%': 1, |
2022 }], | 2021 }], |
2023 # Don't do incremental linking for large modules on 32-bit or when | 2022 # Don't do incremental linking for large modules on 32-bit or when |
2024 # component=static_library as the toolchain fails due to the size of | 2023 # component=static_library as the toolchain fails due to the size of |
2025 # the .ilk files. | 2024 # the .ilk files. |
2026 ['MSVS_OS_BITS==32 or component=="static_library"', { | 2025 ['MSVS_OS_BITS==32 or component=="static_library"', { |
2027 'msvs_large_module_debug_link_mode%': '1', # No | 2026 'msvs_large_module_debug_link_mode%': '1', # No |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
2133 'grit_defines': ['-D', 'scale_factors=2x'], | 2132 'grit_defines': ['-D', 'scale_factors=2x'], |
2134 }], | 2133 }], |
2135 ['OS == "ios"', { | 2134 ['OS == "ios"', { |
2136 'variables': { | 2135 'variables': { |
2137 'enable_coverage%': 0, | 2136 'enable_coverage%': 0, |
2138 }, | 2137 }, |
2139 'grit_defines': [ | 2138 'grit_defines': [ |
2140 '-t', 'ios', | 2139 '-t', 'ios', |
2141 '--no-output-all-resource-defines', | 2140 '--no-output-all-resource-defines', |
2142 ], | 2141 ], |
2143 # Enable host builds when generating with ninja-ios. | 2142 |
2143 # Enable host builds. | |
2144 'host_os%': "mac", | |
2145 | |
2144 'conditions': [ | 2146 'conditions': [ |
2145 ['"<(GENERATOR)"=="ninja"', { | |
2146 'host_os%': "mac", | |
2147 }], | |
2148 | |
2149 # Use the version of clang shipped with Xcode when building official | 2147 # Use the version of clang shipped with Xcode when building official |
2150 # version of Chrome for iOS. | 2148 # version of Chrome for iOS. |
2151 # | 2149 # |
2152 # TODO(eugenebut): Remove enable_coverage check once | 2150 # TODO(eugenebut): Remove enable_coverage check once |
2153 # libclang_rt.profile_ios.a is bundled with Chromium's clang. | 2151 # libclang_rt.profile_ios.a is bundled with Chromium's clang. |
2154 # http://crbug.com/450379 | 2152 # http://crbug.com/450379 |
2155 ['buildtype=="Official" or enable_coverage', { | 2153 ['buildtype=="Official" or enable_coverage', { |
2156 'clang_xcode%': 1, | 2154 'clang_xcode%': 1, |
2157 }], | 2155 }], |
2158 ], | 2156 ], |
(...skipping 2121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4280 'cflags': [ | 4278 'cflags': [ |
4281 '--sysroot=<(sysroot)', | 4279 '--sysroot=<(sysroot)', |
4282 ], | 4280 ], |
4283 'ldflags': [ | 4281 'ldflags': [ |
4284 '--sysroot=<(sysroot)', | 4282 '--sysroot=<(sysroot)', |
4285 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', | 4283 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', |
4286 ], | 4284 ], |
4287 }]] | 4285 }]] |
4288 }], | 4286 }], |
4289 ['clang==1', { | 4287 ['clang==1', { |
4288 'cflags': [ | |
4289 # See http://crbug.com/110262 | |
4290 '-fcolor-diagnostics', | |
4291 ], | |
4290 'cflags_cc': [ | 4292 'cflags_cc': [ |
4291 # gnu++11 instead of c++11 is needed because some code uses | 4293 # gnu++11 instead of c++11 is needed because some code uses |
4292 # typeof() (a GNU extension). | 4294 # typeof() (a GNU extension). |
4293 # TODO(thakis): Eventually switch this to c++11 instead, | 4295 # TODO(thakis): Eventually switch this to c++11 instead, |
4294 # http://crbug.com/427584 | 4296 # http://crbug.com/427584 |
4295 '-std=gnu++11', | 4297 '-std=gnu++11', |
4296 ], | 4298 ], |
4297 }], | 4299 }], |
4298 ['clang==1 and chromeos==1', { | 4300 ['clang==1 and chromeos==1', { |
4299 'cflags': [ | 4301 'cflags': [ |
(...skipping 26 matching lines...) Expand all Loading... | |
4326 ['clang==1 and target_arch=="ia32"', { | 4328 ['clang==1 and target_arch=="ia32"', { |
4327 'cflags': [ | 4329 'cflags': [ |
4328 # Else building libyuv gives clang's register allocator issues, | 4330 # Else building libyuv gives clang's register allocator issues, |
4329 # see llvm.org/PR15798 / crbug.com/233709 | 4331 # see llvm.org/PR15798 / crbug.com/233709 |
4330 '-momit-leaf-frame-pointer', | 4332 '-momit-leaf-frame-pointer', |
4331 # Align the stack on 16-byte boundaries, http://crbug.com/418554. | 4333 # Align the stack on 16-byte boundaries, http://crbug.com/418554. |
4332 '-mstack-alignment=16', | 4334 '-mstack-alignment=16', |
4333 '-mstackrealign', | 4335 '-mstackrealign', |
4334 ], | 4336 ], |
4335 }], | 4337 }], |
4336 ['clang==1 and "<(GENERATOR)"=="ninja"', { | |
4337 'cflags': [ | |
4338 # See http://crbug.com/110262 | |
4339 '-fcolor-diagnostics', | |
4340 ], | |
4341 }], | |
4342 # Common options for AddressSanitizer, LeakSanitizer, | 4338 # Common options for AddressSanitizer, LeakSanitizer, |
4343 # ThreadSanitizer, MemorySanitizer and non-official CFI builds. | 4339 # ThreadSanitizer, MemorySanitizer and non-official CFI builds. |
4344 ['asan==1 or lsan==1 or tsan==1 or msan==1 or ubsan==1 or ubsan_securi ty==1 or ubsan_vptr==1 or ' | 4340 ['asan==1 or lsan==1 or tsan==1 or msan==1 or ubsan==1 or ubsan_securi ty==1 or ubsan_vptr==1 or ' |
4345 '(cfi_vptr==1 and buildtype!="Official")', { | 4341 '(cfi_vptr==1 and buildtype!="Official")', { |
4346 'target_conditions': [ | 4342 'target_conditions': [ |
4347 ['_toolset=="target"', { | 4343 ['_toolset=="target"', { |
4348 'cflags': [ | 4344 'cflags': [ |
4349 '-fno-omit-frame-pointer', | 4345 '-fno-omit-frame-pointer', |
4350 '-gline-tables-only', | 4346 '-gline-tables-only', |
4351 ], | 4347 ], |
(...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
5072 # This warns on selectors from Cocoa headers (-length, -set). | 5068 # This warns on selectors from Cocoa headers (-length, -set). |
5073 # cfe-dev is currently discussing the merits of this warning. | 5069 # cfe-dev is currently discussing the merits of this warning. |
5074 # TODO(thakis): Reevaluate what to do with this, based on the | 5070 # TODO(thakis): Reevaluate what to do with this, based on the |
5075 # cfe-dev discussion. | 5071 # cfe-dev discussion. |
5076 '-Wno-selector-type-mismatch', | 5072 '-Wno-selector-type-mismatch', |
5077 ], | 5073 ], |
5078 'conditions': [ | 5074 'conditions': [ |
5079 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, | 5075 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, |
5080 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} | 5076 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} |
5081 ], | 5077 ], |
5078 ['clang==1', { | |
5079 'OTHER_CFLAGS': [ | |
5080 # See http://crbug.com/110262 | |
5081 '-fcolor-diagnostics', | |
5082 ], | |
5083 }], | |
5082 # Note that the prebuilt Clang binaries should not be used for iOS | 5084 # Note that the prebuilt Clang binaries should not be used for iOS |
5083 # development except for ASan builds. | 5085 # development except for ASan builds. |
5084 ['clang_xcode==0', { | 5086 ['clang_xcode==0', { |
5085 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', | 5087 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang', |
5086 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', | 5088 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++', |
5087 }], | 5089 }], |
5088 ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', { | 5090 ['clang==1 and clang_xcode==0 and clang_use_chrome_plugins==1', { |
5089 'OTHER_CFLAGS': [ | 5091 'OTHER_CFLAGS': [ |
5090 '<@(clang_chrome_plugins_flags)', | 5092 '<@(clang_chrome_plugins_flags)', |
5091 ], | 5093 ], |
5092 }], | 5094 }], |
5093 ['clang==1 and clang_xcode==0 and clang_load!=""', { | 5095 ['clang==1 and clang_xcode==0 and clang_load!=""', { |
5094 'OTHER_CFLAGS': [ | 5096 'OTHER_CFLAGS': [ |
5095 '-Xclang', '-load', '-Xclang', '<(clang_load)', | 5097 '-Xclang', '-load', '-Xclang', '<(clang_load)', |
5096 ], | 5098 ], |
5097 }], | 5099 }], |
5098 ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', { | 5100 ['clang==1 and clang_xcode==0 and clang_add_plugin!=""', { |
5099 'OTHER_CFLAGS': [ | 5101 'OTHER_CFLAGS': [ |
5100 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', | 5102 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
5101 ], | 5103 ], |
5102 }], | 5104 }], |
5103 ['clang==1 and "<(GENERATOR)"=="ninja"', { | |
5104 'OTHER_CFLAGS': [ | |
5105 # See http://crbug.com/110262 | |
5106 '-fcolor-diagnostics', | |
5107 ], | |
5108 }], | |
5109 ['OS=="ios" and target_subarch!="arm32" and \ | |
5110 "<(GENERATOR)"=="xcode"', { | |
5111 'OTHER_CFLAGS': [ | |
5112 # TODO(ios): when building Chrome for iOS on 64-bit platform | |
5113 # with Xcode, the -Wshorted-64-to-32 warning is automatically | |
5114 # enabled. This cause failures when compiling protobuf code, | |
5115 # so disable the warning. http://crbug.com/359107 | |
5116 '-Wno-shorten-64-to-32', | |
5117 ], | |
5118 }], | |
5119 ], | 5105 ], |
5120 }, | 5106 }, |
5121 'conditions': [ | 5107 'conditions': [ |
5122 ['clang==1', { | 5108 ['clang==1', { |
5123 'variables': { | 5109 'variables': { |
5124 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', | 5110 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', |
5125 }, | 5111 }, |
5126 }], | 5112 }], |
5127 ['asan==1', { | 5113 ['asan==1', { |
5128 'xcode_settings': { | 5114 'xcode_settings': { |
(...skipping 922 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6051 ['OS=="linux" and target_arch=="arm" and host_arch!="arm" and chromeos==0 an d clang==0', { | 6037 ['OS=="linux" and target_arch=="arm" and host_arch!="arm" and chromeos==0 an d clang==0', { |
6052 # Set default ARM cross tools on linux. These can be overridden | 6038 # Set default ARM cross tools on linux. These can be overridden |
6053 # using CC,CXX,CC.host and CXX.host environment variables. | 6039 # using CC,CXX,CC.host and CXX.host environment variables. |
6054 'make_global_settings': [ | 6040 'make_global_settings': [ |
6055 ['CC', '<!(which arm-linux-gnueabihf-gcc)'], | 6041 ['CC', '<!(which arm-linux-gnueabihf-gcc)'], |
6056 ['CXX', '<!(which arm-linux-gnueabihf-g++)'], | 6042 ['CXX', '<!(which arm-linux-gnueabihf-g++)'], |
6057 ['CC.host', '<(host_cc)'], | 6043 ['CC.host', '<(host_cc)'], |
6058 ['CXX.host', '<(host_cxx)'], | 6044 ['CXX.host', '<(host_cxx)'], |
6059 ], | 6045 ], |
6060 }], | 6046 }], |
6061 # TODO(yyanagisawa): supports GENERATOR==make | 6047 ['use_goma==1', { |
6062 # make generator doesn't support CC_wrapper without CC | |
6063 # in make_global_settings yet. | |
6064 ['use_goma==1 and ("<(GENERATOR)"=="ninja" or clang==1)', { | |
6065 'make_global_settings': [ | 6048 'make_global_settings': [ |
6066 ['CC_wrapper', '<(gomadir)/gomacc'], | 6049 ['CC_wrapper', '<(gomadir)/gomacc'], |
6067 ['CXX_wrapper', '<(gomadir)/gomacc'], | 6050 ['CXX_wrapper', '<(gomadir)/gomacc'], |
6068 ['CC.host_wrapper', '<(gomadir)/gomacc'], | 6051 ['CC.host_wrapper', '<(gomadir)/gomacc'], |
6069 ['CXX.host_wrapper', '<(gomadir)/gomacc'], | 6052 ['CXX.host_wrapper', '<(gomadir)/gomacc'], |
6070 ], | 6053 ], |
6071 }], | 6054 }], |
6072 ['use_lto==1', { | 6055 ['use_lto==1', { |
6073 'target_defaults': { | 6056 'target_defaults': { |
6074 'target_conditions': [ | 6057 'target_conditions': [ |
(...skipping 258 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
6333 }, { | 6316 }, { |
6334 'SDKROOT': '<(mac_sdk_path)', # -isysroot | 6317 'SDKROOT': '<(mac_sdk_path)', # -isysroot |
6335 }], | 6318 }], |
6336 ], | 6319 ], |
6337 }], | 6320 }], |
6338 ['OS=="ios"', { | 6321 ['OS=="ios"', { |
6339 # Target both iPhone and iPad. | 6322 # Target both iPhone and iPad. |
6340 'TARGETED_DEVICE_FAMILY': '1,2', | 6323 'TARGETED_DEVICE_FAMILY': '1,2', |
6341 'conditions': [ | 6324 'conditions': [ |
6342 ['ios_sdk_path==""', { | 6325 ['ios_sdk_path==""', { |
6343 'conditions': [ | 6326 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot |
6344 # TODO(justincohen): Ninja only supports simulator for now. | |
rohitrao (ping after 24h)
2016/06/13 16:16:50
Is this still a TODO that needs to be addressed?
Nico
2016/06/13 16:18:28
Given that we ship device builds with ninja, I'm a
sdefresne
2016/06/13 16:30:07
AFAIK, gyp ninja generator override this value and
| |
6345 ['"<(GENERATOR)"=="xcode"', { | |
6346 'SDKROOT': 'iphoneos<(ios_sdk)', # -isysroot | |
6347 }, { | |
6348 'SDKROOT': 'iphonesimulator<(ios_sdk)', # -isysroot | |
6349 }], | |
6350 ], | |
6351 }, { | 6327 }, { |
6352 'SDKROOT': '<(ios_sdk_path)', # -isysroot | 6328 'SDKROOT': '<(ios_sdk_path)', # -isysroot |
6353 }], | 6329 }], |
6354 ], | 6330 ], |
6355 }], | 6331 }], |
6356 ], | 6332 ], |
6357 | 6333 |
6358 # The Xcode generator will look for an xcode_settings section at the root | 6334 # The Xcode generator will look for an xcode_settings section at the root |
6359 # of each dict and use it to apply settings on a file-wide basis. Most | 6335 # of each dict and use it to apply settings on a file-wide basis. Most |
6360 # settings should not be here, they should be in target-specific | 6336 # settings should not be here, they should be in target-specific |
6361 # xcode_settings sections, or better yet, should use non-Xcode-specific | 6337 # xcode_settings sections, or better yet, should use non-Xcode-specific |
6362 # settings in target dicts. SYMROOT is a special case, because many other | 6338 # settings in target dicts. SYMROOT is a special case, because many other |
6363 # Xcode variables depend on it, including variables such as | 6339 # Xcode variables depend on it, including variables such as |
6364 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 6340 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
6365 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 6341 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
6366 # files to appear (when present) in the UI as actual files and not red | 6342 # files to appear (when present) in the UI as actual files and not red |
6367 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 6343 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
6368 # and therefore SYMROOT, needs to be set at the project level. | 6344 # and therefore SYMROOT, needs to be set at the project level. |
6369 'SYMROOT': '<(DEPTH)/xcodebuild', | 6345 'SYMROOT': '<(DEPTH)/xcodebuild', |
6370 }, | 6346 }, |
6371 } | 6347 } |
OLD | NEW |