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 if (is_ios) { | 6 if (is_ios) { |
7 import("//build/config/ios/ios_sdk.gni") | 7 import("//build/config/ios/ios_sdk.gni") |
8 } | 8 } |
9 import("//build/config/mac/mac_sdk.gni") | 9 import("//build/config/mac/mac_sdk.gni") |
10 import("//build/config/mac/symbols.gni") | 10 import("//build/config/mac/symbols.gni") |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
112 ldflags = [ "-Wl,-pie" ] # Position independent. | 112 ldflags = [ "-Wl,-pie" ] # Position independent. |
113 } | 113 } |
114 | 114 |
115 # The ldflags referenced below are handled by | 115 # The ldflags referenced below are handled by |
116 # //build/toolchain/mac/linker_driver.py. | 116 # //build/toolchain/mac/linker_driver.py. |
117 # Remove this config if a target wishes to change the arguments passed to the | 117 # Remove this config if a target wishes to change the arguments passed to the |
118 # strip command during linking. This config by default strips all symbols | 118 # strip command during linking. This config by default strips all symbols |
119 # from a binary, but some targets may wish to specify a saves file to preserve | 119 # from a binary, but some targets may wish to specify a saves file to preserve |
120 # specific symbols. | 120 # specific symbols. |
121 config("strip_all") { | 121 config("strip_all") { |
122 if (is_ios && additional_toolchains != []) { | 122 # On iOS, the final applications are assembled using lipo (to support fat |
123 # For fat build, the generation of the dSYM happens after the fat binary has | 123 # builds). This configuration is thus always empty and the correct flags |
124 # been created with "lipo" thus the stripping cannot happen at link time but | 124 # are passed to the linker_driver.py script directly during the lipo call. |
125 # after running "lipo" too. | 125 if (enable_stripping && !is_ios) { |
126 _enable_stripping = false | |
127 } else { | |
128 _enable_stripping = enable_stripping | |
129 } | |
130 | |
131 if (_enable_stripping) { | |
132 ldflags = [ "-Wcrl,strip,-x,-S" ] | 126 ldflags = [ "-Wcrl,strip,-x,-S" ] |
133 } | 127 } |
134 } | 128 } |
OLD | NEW |