| 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 5172 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5183 # Prevent Mac OS X AssertMacros.h from defining macros that collide | 5183 # Prevent Mac OS X AssertMacros.h from defining macros that collide |
| 5184 # with common names, like 'check', 'require', and 'verify'. | 5184 # with common names, like 'check', 'require', and 'verify'. |
| 5185 # (Included by system header. Also exists on iOS but not included.) | 5185 # (Included by system header. Also exists on iOS but not included.) |
| 5186 # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/
AssertMacros.h | 5186 # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/
AssertMacros.h |
| 5187 '__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0', | 5187 '__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0', |
| 5188 ], | 5188 ], |
| 5189 'variables': { | 5189 'variables': { |
| 5190 # These should end with %, but there seems to be a bug with % in | 5190 # These should end with %, but there seems to be a bug with % in |
| 5191 # variables that are intended to be set to different values in | 5191 # variables that are intended to be set to different values in |
| 5192 # different targets, like these. | 5192 # different targets, like these. |
| 5193 'mac_pie': 1, # Most executables can be position-independent. | |
| 5194 # Strip debugging symbols from the target. | 5193 # Strip debugging symbols from the target. |
| 5195 'mac_strip': '<(mac_strip_release)', | 5194 'mac_strip': '<(mac_strip_release)', |
| 5196 'conditions': [ | 5195 'conditions': [ |
| 5197 ['asan==1', { | 5196 ['asan==1', { |
| 5198 'conditions': [ | 5197 'conditions': [ |
| 5199 ['mac_want_real_dsym=="default"', { | 5198 ['mac_want_real_dsym=="default"', { |
| 5200 'mac_real_dsym': 1, | 5199 'mac_real_dsym': 1, |
| 5201 }, { | 5200 }, { |
| 5202 'mac_real_dsym': '<(mac_want_real_dsym)' | 5201 'mac_real_dsym': '<(mac_want_real_dsym)' |
| 5203 }], | 5202 }], |
| (...skipping 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5276 # ASan requires 10.7+ and clang implicitly adds -lc++abi in ASan | 5275 # ASan requires 10.7+ and clang implicitly adds -lc++abi in ASan |
| 5277 # mode. Our libc++.a contains both libc++ and libc++abi in one | 5276 # mode. Our libc++.a contains both libc++ and libc++abi in one |
| 5278 # library, so it doesn't work in that mode. | 5277 # library, so it doesn't work in that mode. |
| 5279 'conditions': [ | 5278 'conditions': [ |
| 5280 ['asan==0', { | 5279 ['asan==0', { |
| 5281 'library_dirs': [ '<(DEPTH)/third_party/libc++-static' ], | 5280 'library_dirs': [ '<(DEPTH)/third_party/libc++-static' ], |
| 5282 }], | 5281 }], |
| 5283 ], | 5282 ], |
| 5284 }], | 5283 }], |
| 5285 ['_type=="executable"', { | 5284 ['_type=="executable"', { |
| 5286 'postbuilds': [ | 5285 # Turn on position-independence (ASLR) for executables. When |
| 5287 { | 5286 # PIE is on for the Chrome executables, the framework will |
| 5288 # Arranges for data (heap) pages to be protected against | 5287 # also be subject to ASLR. |
| 5289 # code execution when running on Mac OS X 10.7 ("Lion"), and | 5288 'xcode_settings': { |
| 5290 # ensures that the position-independent executable (PIE) bit | 5289 'OTHER_LDFLAGS': [ |
| 5291 # is set for ASLR when running on Mac OS X 10.5 ("Leopard"). | 5290 '-Wl,-pie', # Position-independent executable (MH_PIE) |
| 5292 'variables': { | 5291 ], |
| 5293 # Define change_mach_o_flags in a variable ending in _path | 5292 }, |
| 5294 # so that GYP understands it's a path and performs proper | |
| 5295 # relativization during dict merging. | |
| 5296 'change_mach_o_flags_path': | |
| 5297 'mac/change_mach_o_flags_from_xcode.sh', | |
| 5298 'change_mach_o_flags_options%': [ | |
| 5299 ], | |
| 5300 'target_conditions': [ | |
| 5301 ['mac_pie==0 or release_valgrind_build==1', { | |
| 5302 # Don't enable PIE if it's unwanted. It's unwanted if | |
| 5303 # the target specifies mac_pie=0 or if building for | |
| 5304 # Valgrind, because Valgrind doesn't understand slide. | |
| 5305 # See the similar mac_pie/release_valgrind_build check | |
| 5306 # below. | |
| 5307 'change_mach_o_flags_options': [ | |
| 5308 '--no-pie', | |
| 5309 ], | |
| 5310 }], | |
| 5311 ], | |
| 5312 }, | |
| 5313 'postbuild_name': 'Change Mach-O Flags', | |
| 5314 'action': [ | |
| 5315 '<(change_mach_o_flags_path)', | |
| 5316 '>@(change_mach_o_flags_options)', | |
| 5317 ], | |
| 5318 }, | |
| 5319 ], | |
| 5320 'target_conditions': [ | |
| 5321 ['mac_pie==1 and release_valgrind_build==0', { | |
| 5322 # Turn on position-independence (ASLR) for executables. When | |
| 5323 # PIE is on for the Chrome executables, the framework will | |
| 5324 # also be subject to ASLR. | |
| 5325 # Don't do this when building for Valgrind, because Valgrind | |
| 5326 # doesn't understand slide. TODO: Make Valgrind on Mac OS X | |
| 5327 # understand slide, and get rid of the Valgrind check. | |
| 5328 'xcode_settings': { | |
| 5329 'OTHER_LDFLAGS': [ | |
| 5330 '-Wl,-pie', # Position-independent executable (MH_PIE) | |
| 5331 ], | |
| 5332 }, | |
| 5333 }], | |
| 5334 ], | |
| 5335 }], | 5293 }], |
| 5336 ['(_type=="executable" or _type=="shared_library" or \ | 5294 ['(_type=="executable" or _type=="shared_library" or \ |
| 5337 _type=="loadable_module") and mac_strip!=0', { | 5295 _type=="loadable_module") and mac_strip!=0', { |
| 5338 'target_conditions': [ | 5296 'target_conditions': [ |
| 5339 ['mac_real_dsym == 1', { | 5297 ['mac_real_dsym == 1', { |
| 5340 # To get a real .dSYM bundle produced by dsymutil, set the | 5298 # To get a real .dSYM bundle produced by dsymutil, set the |
| 5341 # debug information format to dwarf-with-dsym. Since | 5299 # debug information format to dwarf-with-dsym. Since |
| 5342 # strip_from_xcode will not be used, set Xcode to do the | 5300 # strip_from_xcode will not be used, set Xcode to do the |
| 5343 # stripping as well. | 5301 # stripping as well. |
| 5344 'configurations': { | 5302 'configurations': { |
| (...skipping 1020 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6365 # settings in target dicts. SYMROOT is a special case, because many other | 6323 # settings in target dicts. SYMROOT is a special case, because many other |
| 6366 # Xcode variables depend on it, including variables such as | 6324 # Xcode variables depend on it, including variables such as |
| 6367 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 6325 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 6368 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 6326 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 6369 # files to appear (when present) in the UI as actual files and not red | 6327 # files to appear (when present) in the UI as actual files and not red |
| 6370 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 6328 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 6371 # and therefore SYMROOT, needs to be set at the project level. | 6329 # and therefore SYMROOT, needs to be set at the project level. |
| 6372 'SYMROOT': '<(DEPTH)/xcodebuild', | 6330 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 6373 }, | 6331 }, |
| 6374 } | 6332 } |
| OLD | NEW |