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 | 8 |
8 # 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 |
9 # 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. |
10 # | 11 # |
11 # This is applied to BOTH desktop Mac and iOS targets. | 12 # This is applied to BOTH desktop Mac and iOS targets. |
12 config("compiler") { | 13 config("compiler") { |
13 # These flags are shared between the C compiler and linker. | 14 # These flags are shared between the C compiler and linker. |
14 common_mac_flags = [] | 15 common_mac_flags = [] |
15 | 16 |
16 # CPU architecture. | 17 # CPU architecture. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
79 "-Wl,-rpath,@loader_path/../../..", | 80 "-Wl,-rpath,@loader_path/../../..", |
80 ] | 81 ] |
81 } | 82 } |
82 } | 83 } |
83 | 84 |
84 # On Mac, this is used only for executables. | 85 # On Mac, this is used only for executables. |
85 config("mac_executable_flags") { | 86 config("mac_executable_flags") { |
86 # Remove this when targeting >=10.7 since it is the default in that config. | 87 # Remove this when targeting >=10.7 since it is the default in that config. |
87 ldflags = [ "-Wl,-pie" ] # Position independent. | 88 ldflags = [ "-Wl,-pie" ] # Position independent. |
88 } | 89 } |
| 90 |
| 91 # The ldflags referenced below are handled by |
| 92 # //build/toolchain/mac/linker_driver.py. |
| 93 # 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 |
| 95 # from a binary, but some targets may wish to specify a saves file to preserve |
| 96 # specific symbols. |
| 97 config("strip_all") { |
| 98 if (enable_stripping) { |
| 99 ldflags = [ "-Wcrl,strip,-x,-S" ] |
| 100 } |
| 101 } |
OLD | NEW |