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 5242 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5253 # grown larger than 4GB, which dsymutil can't handle. Reduce | 5253 # grown larger than 4GB, which dsymutil can't handle. Reduce |
5254 # the amount of debug symbols. | 5254 # the amount of debug symbols. |
5255 '-fno-standalone-debug', # See http://crbug.com/479841 | 5255 '-fno-standalone-debug', # See http://crbug.com/479841 |
5256 ] | 5256 ] |
5257 }, | 5257 }, |
5258 }], | 5258 }], |
5259 ], | 5259 ], |
5260 }, # configuration "Release" | 5260 }, # configuration "Release" |
5261 }, # configurations | 5261 }, # configurations |
5262 'xcode_settings': { | 5262 'xcode_settings': { |
5263 # Tell the compiler to use libc++'s headers and the linker to link | |
5264 # against libc++. The latter part normally requires OS X 10.7, but | |
5265 # we still support running on 10.6. How does this work? Two parts: | |
5266 # 1. Chromium's clang doesn't error on -mmacosx-version-min=10.6 | |
5267 # combined with -stdlib=libc++ (it normally silently produced a | |
5268 # binary that doesn't run on 10.6) | |
5269 # 2. Further down, library_dirs is set to third_party/libc++-static, | |
5270 # which contains a static libc++.a library. The linker then links | |
5271 # against that instead of against /usr/lib/libc++.dylib when it | |
5272 # sees the -lc++ flag added by the driver. | |
5273 # | |
5274 # In component builds, just link to the system libc++. | |
5275 # This has the effect of making everything depend on libc++, which | |
5276 # means component-build binaries won't run on 10.6 (no libc++ there), | |
5277 # but for a developer-only configuration that's ok. (We don't want | |
5278 # to raise the deployment target yet so that official and dev builds | |
5279 # have the same deployment target. This affects things like which | |
5280 # functions are considered deprecated.) | |
5281 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++ | |
5282 | |
5283 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic | 5263 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
5284 # (Equivalent to -fPIC) | 5264 # (Equivalent to -fPIC) |
5285 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min | 5265 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min |
5286 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', | 5266 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
5287 # Keep pch files below xcodebuild/. | 5267 # Keep pch files below xcodebuild/. |
5288 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHe
aders', | 5268 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHe
aders', |
5289 'OTHER_CFLAGS': [ | 5269 'OTHER_CFLAGS': [ |
5290 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO' | 5270 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO' |
5291 # xcode_setting, but not until all downstream projects' mac bots are | 5271 # xcode_setting, but not until all downstream projects' mac bots are |
5292 # using xcode >= 4.6, because that's when the default value of the | 5272 # using xcode >= 4.6, because that's when the default value of the |
5293 # flag in the compiler switched. Pre-4.6, the value 'NO' for that | 5273 # flag in the compiler switched. Pre-4.6, the value 'NO' for that |
5294 # setting is a no-op as far as xcode is concerned, but the compiler | 5274 # setting is a no-op as far as xcode is concerned, but the compiler |
5295 # behaves differently based on whether -fno-strict-aliasing is | 5275 # behaves differently based on whether -fno-strict-aliasing is |
5296 # specified or not. | 5276 # specified or not. |
5297 '-fno-strict-aliasing', # See http://crbug.com/32204. | 5277 '-fno-strict-aliasing', # See http://crbug.com/32204. |
5298 ], | 5278 ], |
| 5279 'conditions': [ |
| 5280 ['component=="shared_library"', { |
| 5281 # In component builds, link to the system libc++. This requires |
| 5282 # OS X 10.7, but we currently pass -mmacosx-version-min=10.6. |
| 5283 # Xcode's clang complains about this, but our open-source bundled |
| 5284 # chromium clang doesn't. This has the effect of making |
| 5285 # everything depend on libc++, which means component-build |
| 5286 # binaries won't run on 10.6 (no libc++ there), but for a |
| 5287 # developer-only configuration that's ok. |
| 5288 # (We don't want to raise the deployment target yet so that |
| 5289 # official and dev builds have the same deployment target. This |
| 5290 # affects things like which functions are considered deprecated.) |
| 5291 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++ |
| 5292 }], |
| 5293 ], |
5299 }, | 5294 }, |
5300 'target_conditions': [ | 5295 'target_conditions': [ |
5301 ['>(nacl_untrusted_build)==0 and component=="static_library" and asan=
=0', { | |
5302 # See the comment for CLANG_CXX_LIBRARY above for what this does. | |
5303 # The NaCl toolchains have their own toolchain and don't need this. | |
5304 # ASan requires 10.7+ and clang implicitly adds -lc++abi in ASan | |
5305 # mode. Our libc++.a contains both libc++ and libc++abi in one | |
5306 # library, so it doesn't work in that mode. | |
5307 'library_dirs': [ | |
5308 '<(DEPTH)/third_party/libc++-static', | |
5309 ], | |
5310 }], | |
5311 ['_type=="executable"', { | 5296 ['_type=="executable"', { |
5312 'postbuilds': [ | 5297 'postbuilds': [ |
5313 { | 5298 { |
5314 # Arranges for data (heap) pages to be protected against | 5299 # Arranges for data (heap) pages to be protected against |
5315 # code execution when running on Mac OS X 10.7 ("Lion"), and | 5300 # code execution when running on Mac OS X 10.7 ("Lion"), and |
5316 # ensures that the position-independent executable (PIE) bit | 5301 # ensures that the position-independent executable (PIE) bit |
5317 # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). | 5302 # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). |
5318 'variables': { | 5303 'variables': { |
5319 # Define change_mach_o_flags in a variable ending in _path | 5304 # Define change_mach_o_flags in a variable ending in _path |
5320 # so that GYP understands it's a path and performs proper | 5305 # so that GYP understands it's a path and performs proper |
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6327 # settings in target dicts. SYMROOT is a special case, because many other | 6312 # settings in target dicts. SYMROOT is a special case, because many other |
6328 # Xcode variables depend on it, including variables such as | 6313 # Xcode variables depend on it, including variables such as |
6329 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 6314 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
6330 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 6315 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
6331 # files to appear (when present) in the UI as actual files and not red | 6316 # files to appear (when present) in the UI as actual files and not red |
6332 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 6317 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
6333 # and therefore SYMROOT, needs to be set at the project level. | 6318 # and therefore SYMROOT, needs to be set at the project level. |
6334 'SYMROOT': '<(DEPTH)/xcodebuild', | 6319 'SYMROOT': '<(DEPTH)/xcodebuild', |
6335 }, | 6320 }, |
6336 } | 6321 } |
OLD | NEW |