| 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 30 matching lines...) Expand all Loading... |
| 41 cflags = common_mac_flags | 41 cflags = common_mac_flags |
| 42 | 42 |
| 43 # Without this, the constructors and destructors of a C++ object inside | 43 # Without this, the constructors and destructors of a C++ object inside |
| 44 # an Objective C struct won't be called, which is very bad. | 44 # an Objective C struct won't be called, which is very bad. |
| 45 cflags_objcc = [ "-fobjc-call-cxx-cdtors" ] | 45 cflags_objcc = [ "-fobjc-call-cxx-cdtors" ] |
| 46 | 46 |
| 47 cflags_c = [ "-std=c99" ] | 47 cflags_c = [ "-std=c99" ] |
| 48 cflags_objc = cflags_c | 48 cflags_objc = cflags_c |
| 49 | 49 |
| 50 ldflags = common_mac_flags | 50 ldflags = common_mac_flags |
| 51 |
| 52 if (save_unstripped_output) { |
| 53 ldflags += [ "-Wcrl,unstripped," + rebase_path(root_out_dir) ] |
| 54 } |
| 51 } | 55 } |
| 52 | 56 |
| 53 # This is included by reference in the //build/config/compiler:runtime_library | 57 # This is included by reference in the //build/config/compiler:runtime_library |
| 54 # config that is applied to all targets. It is here to separate out the logic | 58 # config that is applied to all targets. It is here to separate out the logic |
| 55 # that is Mac-only. Please see that target for advice on what should go in | 59 # that is Mac-only. Please see that target for advice on what should go in |
| 56 # :runtime_library vs. :compiler. | 60 # :runtime_library vs. :compiler. |
| 57 config("runtime_library") { | 61 config("runtime_library") { |
| 58 common_flags = [ | 62 common_flags = [ |
| 59 "-isysroot", | 63 "-isysroot", |
| 60 sysroot, | 64 sysroot, |
| (...skipping 39 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 100 # //build/toolchain/mac/linker_driver.py. | 104 # //build/toolchain/mac/linker_driver.py. |
| 101 # Remove this config if a target wishes to change the arguments passed to the | 105 # Remove this config if a target wishes to change the arguments passed to the |
| 102 # strip command during linking. This config by default strips all symbols | 106 # strip command during linking. This config by default strips all symbols |
| 103 # from a binary, but some targets may wish to specify a saves file to preserve | 107 # from a binary, but some targets may wish to specify a saves file to preserve |
| 104 # specific symbols. | 108 # specific symbols. |
| 105 config("strip_all") { | 109 config("strip_all") { |
| 106 if (enable_stripping) { | 110 if (enable_stripping) { |
| 107 ldflags = [ "-Wcrl,strip,-x,-S" ] | 111 ldflags = [ "-Wcrl,strip,-x,-S" ] |
| 108 } | 112 } |
| 109 } | 113 } |
| OLD | NEW |