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 # Everything should include libc++ headers. Just passing |
| 5264 # -stdlib=libc++ doesn't just work in NaCl targets with asan enabled |
| 5265 # until http://crbug.com/544325 is fixed, so tell the compiler to not |
| 5266 # add any include paths, and instead below add the c++ include |
| 5267 # directory as include_dirs. Then we can not set CLANG_CXX_LIBRARY |
| 5268 # to libc++ for NaCl targets and that way they'll link against |
| 5269 # libstdc++ on the ASan bots (ASan requires a C++ library to be linked |
| 5270 # even for the C-only NaCl programs). |
| 5271 'OTHER_CPLUSPLUSFLAGS': [ '$inherited', '-nostdinc++', ], |
| 5272 |
5263 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic | 5273 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic |
5264 # (Equivalent to -fPIC) | 5274 # (Equivalent to -fPIC) |
5265 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min | 5275 # MACOSX_DEPLOYMENT_TARGET maps to -mmacosx-version-min |
5266 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', | 5276 'MACOSX_DEPLOYMENT_TARGET': '<(mac_deployment_target)', |
5267 # Keep pch files below xcodebuild/. | 5277 # Keep pch files below xcodebuild/. |
5268 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHe
aders', | 5278 'SHARED_PRECOMPS_DIR': '$(CONFIGURATION_BUILD_DIR)/SharedPrecompiledHe
aders', |
5269 'OTHER_CFLAGS': [ | 5279 'OTHER_CFLAGS': [ |
5270 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO' | 5280 # Someday this can be replaced by an 'GCC_STRICT_ALIASING': 'NO' |
5271 # xcode_setting, but not until all downstream projects' mac bots are | 5281 # xcode_setting, but not until all downstream projects' mac bots are |
5272 # using xcode >= 4.6, because that's when the default value of the | 5282 # using xcode >= 4.6, because that's when the default value of the |
5273 # flag in the compiler switched. Pre-4.6, the value 'NO' for that | 5283 # flag in the compiler switched. Pre-4.6, the value 'NO' for that |
5274 # setting is a no-op as far as xcode is concerned, but the compiler | 5284 # setting is a no-op as far as xcode is concerned, but the compiler |
5275 # behaves differently based on whether -fno-strict-aliasing is | 5285 # behaves differently based on whether -fno-strict-aliasing is |
5276 # specified or not. | 5286 # specified or not. |
5277 '-fno-strict-aliasing', # See http://crbug.com/32204. | 5287 '-fno-strict-aliasing', # See http://crbug.com/32204. |
5278 ], | 5288 ], |
5279 'conditions': [ | 5289 'conditions': [ |
5280 ['component=="shared_library"', { | 5290 # TODO(thakis): Remove this condition once http://crbug.com/544325 |
5281 # In component builds, link to the system libc++. This requires | 5291 # is fixed. Some targets below native_client still link use the |
5282 # OS X 10.7, but we currently pass -mmacosx-version-min=10.6. | 5292 # 10.6 SDK which doesn't contain a libc++. |
5283 # Xcode's clang complains about this, but our open-source bundled | 5293 ['mac_sdk!="10.6"', { |
5284 # chromium clang doesn't. This has the effect of making | 5294 # Tell the compiler to use libc++'s headers and the linker to link |
5285 # everything depend on libc++, which means component-build | 5295 # against libc++. The latter part normally requires OS X 10.7, |
5286 # binaries won't run on 10.6 (no libc++ there), but for a | 5296 # but we still support running on 10.6. How does this work? Two |
5287 # developer-only configuration that's ok. | 5297 # parts: |
5288 # (We don't want to raise the deployment target yet so that | 5298 # 1. Chromium's clang doesn't error on -mmacosx-version-min=10.6 |
5289 # official and dev builds have the same deployment target. This | 5299 # combined with -stdlib=libc++ (it normally silently produced a |
5290 # affects things like which functions are considered deprecated.) | 5300 # binary that doesn't run on 10.6) |
| 5301 # 2. Further down, library_dirs is set to |
| 5302 # third_party/libc++-static, which contains a static |
| 5303 # libc++.a library. The linker then links against that instead |
| 5304 # of against /usr/lib/libc++.dylib when it sees the -lc++ flag |
| 5305 # added by the driver. |
| 5306 # |
| 5307 # In component builds, just link to the system libc++. This has |
| 5308 # the effect of making everything depend on libc++, which means |
| 5309 # component-build binaries won't run on 10.6 (no libc++ there), |
| 5310 # but for a developer-only configuration that's ok. (We don't |
| 5311 # want to raise the deployment target yet so that official and |
| 5312 # dev builds have the same deployment target. This affects |
| 5313 # things like which functions are considered deprecated.) |
5291 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++ | 5314 'CLANG_CXX_LIBRARY': 'libc++', # -stdlib=libc++ |
| 5315 |
5292 }], | 5316 }], |
5293 ], | 5317 ], |
5294 }, | 5318 }, |
5295 'target_conditions': [ | 5319 'target_conditions': [ |
| 5320 ['>(nacl_untrusted_build)==0', { |
| 5321 'include_dirs': [ |
| 5322 '<(DEPTH)/third_party/llvm-build/Release+Asserts/include/c++/v1', |
| 5323 ], |
| 5324 }], |
| 5325 ['>(nacl_untrusted_build)==0 and component=="static_library"', { |
| 5326 # See the comment for CLANG_CXX_LIBRARY above for what this does. |
| 5327 # The NaCl toolchains have their own toolchain and don't need this. |
| 5328 # ASan requires 10.7+ and clang implicitly adds -lc++abi in ASan |
| 5329 # mode. Our libc++.a contains both libc++ and libc++abi in one |
| 5330 # library, so it doesn't work in that mode. |
| 5331 'conditions': [ |
| 5332 ['asan==0', { |
| 5333 'library_dirs': [ '<(DEPTH)/third_party/libc++-static' ], |
| 5334 }], |
| 5335 ], |
| 5336 }], |
5296 ['_type=="executable"', { | 5337 ['_type=="executable"', { |
5297 'postbuilds': [ | 5338 'postbuilds': [ |
5298 { | 5339 { |
5299 # Arranges for data (heap) pages to be protected against | 5340 # Arranges for data (heap) pages to be protected against |
5300 # code execution when running on Mac OS X 10.7 ("Lion"), and | 5341 # code execution when running on Mac OS X 10.7 ("Lion"), and |
5301 # ensures that the position-independent executable (PIE) bit | 5342 # ensures that the position-independent executable (PIE) bit |
5302 # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). | 5343 # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). |
5303 'variables': { | 5344 'variables': { |
5304 # Define change_mach_o_flags in a variable ending in _path | 5345 # Define change_mach_o_flags in a variable ending in _path |
5305 # so that GYP understands it's a path and performs proper | 5346 # so that GYP understands it's a path and performs proper |
(...skipping 1006 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6312 # settings in target dicts. SYMROOT is a special case, because many other | 6353 # settings in target dicts. SYMROOT is a special case, because many other |
6313 # Xcode variables depend on it, including variables such as | 6354 # Xcode variables depend on it, including variables such as |
6314 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 6355 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
6315 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 6356 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
6316 # files to appear (when present) in the UI as actual files and not red | 6357 # files to appear (when present) in the UI as actual files and not red |
6317 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 6358 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
6318 # and therefore SYMROOT, needs to be set at the project level. | 6359 # and therefore SYMROOT, needs to be set at the project level. |
6319 'SYMROOT': '<(DEPTH)/xcodebuild', | 6360 'SYMROOT': '<(DEPTH)/xcodebuild', |
6320 }, | 6361 }, |
6321 } | 6362 } |
OLD | NEW |