| 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 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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 } | 67 } |
| 68 | 68 |
| 69 # On Mac, this is used for everything except static libraries. | 69 # On Mac, this is used for everything except static libraries. |
| 70 config("mac_dynamic_flags") { | 70 config("mac_dynamic_flags") { |
| 71 ldflags = [] | 71 ldflags = [ "-Wl,-ObjC" ] # Always load Objective-C categories and classes. |
| 72 | 72 |
| 73 if (is_component_build) { | 73 if (is_component_build) { |
| 74 ldflags += [ | 74 ldflags += [ |
| 75 # Path for loading shared libraries for unbundled binaries. | 75 # Path for loading shared libraries for unbundled binaries. |
| 76 "-Wl,-rpath,@loader_path/.", | 76 "-Wl,-rpath,@loader_path/.", |
| 77 | 77 |
| 78 # Path for loading shared libraries for bundled binaries. Get back from | 78 # Path for loading shared libraries for bundled binaries. Get back from |
| 79 # Binary.app/Contents/MacOS. | 79 # Binary.app/Contents/MacOS. |
| 80 "-Wl,-rpath,@loader_path/../../..", | 80 "-Wl,-rpath,@loader_path/../../..", |
| 81 ] | 81 ] |
| (...skipping 10 matching lines...) Expand all Loading... |
| 92 # //build/toolchain/mac/linker_driver.py. | 92 # //build/toolchain/mac/linker_driver.py. |
| 93 # Remove this config if a target wishes to change the arguments passed to the | 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 | 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 | 95 # from a binary, but some targets may wish to specify a saves file to preserve |
| 96 # specific symbols. | 96 # specific symbols. |
| 97 config("strip_all") { | 97 config("strip_all") { |
| 98 if (enable_stripping) { | 98 if (enable_stripping) { |
| 99 ldflags = [ "-Wcrl,strip,-x,-S" ] | 99 ldflags = [ "-Wcrl,strip,-x,-S" ] |
| 100 } | 100 } |
| 101 } | 101 } |
| OLD | NEW |