| OLD | NEW |
| 1 # Copyright (c) 2013 The Chromium Authors. All rights reserved. | 1 # Copyright (c) 2013 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 import("//build/config/sysroot.gni") | 5 import("//build/config/sysroot.gni") |
| 6 import("//build/config/mac/mac_sdk.gni") | 6 import("//build/config/mac/mac_sdk.gni") |
| 7 import("//build/config/mac/symbols.gni") | 7 import("//build/config/mac/symbols.gni") |
| 8 | 8 |
| 9 # This is included by reference in the //build/config/compiler config that | 9 # This is included by reference in the //build/config/compiler config that |
| 10 # is applied to all targets. It is here to separate out the logic. | 10 # is applied to all targets. It is here to separate out the logic. |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 57 config("runtime_library") { | 57 config("runtime_library") { |
| 58 common_flags = [ | 58 common_flags = [ |
| 59 "-isysroot", | 59 "-isysroot", |
| 60 sysroot, | 60 sysroot, |
| 61 "-mmacosx-version-min=$mac_deployment_target", | 61 "-mmacosx-version-min=$mac_deployment_target", |
| 62 ] | 62 ] |
| 63 | 63 |
| 64 asmflags = common_flags | 64 asmflags = common_flags |
| 65 cflags = common_flags | 65 cflags = common_flags |
| 66 ldflags = common_flags | 66 ldflags = common_flags |
| 67 |
| 68 if (is_mac) { |
| 69 # Prevent Mac OS X AssertMacros.h from defining macros that collide |
| 70 # with common names, like 'check', 'require', and 'verify'. |
| 71 # (Included by system header. Also exists on iOS but not included.) |
| 72 # http://opensource.apple.com/source/CarbonHeaders/CarbonHeaders-18.1/Assert
Macros.h |
| 73 defines = [ "__ASSERT_MACROS_DEFINE_VERSIONS_WITHOUT_UNDERSCORE=0" ] |
| 74 } |
| 67 } | 75 } |
| 68 | 76 |
| 69 # On Mac, this is used for everything except static libraries. | 77 # On Mac, this is used for everything except static libraries. |
| 70 config("mac_dynamic_flags") { | 78 config("mac_dynamic_flags") { |
| 71 ldflags = [] | 79 ldflags = [] |
| 72 | 80 |
| 73 if (is_component_build) { | 81 if (is_component_build) { |
| 74 ldflags += [ | 82 ldflags += [ |
| 75 # Path for loading shared libraries for unbundled binaries. | 83 # Path for loading shared libraries for unbundled binaries. |
| 76 "-Wl,-rpath,@loader_path/.", | 84 "-Wl,-rpath,@loader_path/.", |
| (...skipping 15 matching lines...) Expand all Loading... |
| 92 # //build/toolchain/mac/linker_driver.py. | 100 # //build/toolchain/mac/linker_driver.py. |
| 93 # Remove this config if a target wishes to change the arguments passed to the | 101 # Remove this config if a target wishes to change the arguments passed to the |
| 94 # strip command during linking. This config by default strips all symbols | 102 # strip command during linking. This config by default strips all symbols |
| 95 # from a binary, but some targets may wish to specify a saves file to preserve | 103 # from a binary, but some targets may wish to specify a saves file to preserve |
| 96 # specific symbols. | 104 # specific symbols. |
| 97 config("strip_all") { | 105 config("strip_all") { |
| 98 if (enable_stripping) { | 106 if (enable_stripping) { |
| 99 ldflags = [ "-Wcrl,strip,-x,-S" ] | 107 ldflags = [ "-Wcrl,strip,-x,-S" ] |
| 100 } | 108 } |
| 101 } | 109 } |
| OLD | NEW |