Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(165)

Unified Diff: build/config/mac/base_rules.gni

Issue 2160653002: [iOS/GN] Fix generation of .dSYM for fat binary builds. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Rebase and add support for save_unstripped_output. Created 4 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/mac/BUILD.gn ('k') | build/toolchain/mac/BUILD.gn » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/mac/base_rules.gni
diff --git a/build/config/mac/base_rules.gni b/build/config/mac/base_rules.gni
index 2546a629fa5b31cf9bbd39d11231827ad4032b38..151c23503fffa6ad16981fed6292f7794f5b484f 100644
--- a/build/config/mac/base_rules.gni
+++ b/build/config/mac/base_rules.gni
@@ -5,6 +5,7 @@
# This file contains rules that are shared between Mac and iOS.
import("//build/toolchain/toolchain.gni")
+import("//build/config/mac/symbols.gni")
if (is_mac) {
import("//build/config/mac/mac_sdk.gni")
@@ -314,7 +315,7 @@ template("framework_bundle") {
action(_lipo_shared_library_target) {
forward_variables_from(invoker, [ "testonly" ])
visibility = _lipo_shared_library_visibility
- script = "//build/config/mac/xcrun.py"
+ script = "//build/toolchain/mac/linker_driver.py"
outputs = [
"$target_out_dir/$_lipo_shared_library_target/$_output_name",
]
@@ -331,11 +332,43 @@ template("framework_bundle") {
"target_out_dir") + "/$_output_name" ]
}
args = [
+ "xcrun",
"lipo",
"-create",
"-output",
rebase_path(outputs[0], root_build_dir),
] + rebase_path(inputs, root_build_dir)
+
+ if (enable_dsyms) {
+ outputs += [ "$root_out_dir/$_output_name.dSYM/" ]
+ args +=
+ [ "-Wcrl,dsym," + rebase_path("$root_out_dir/.", root_build_dir) ]
+ }
+
+ if (enable_stripping) {
+ # Check whether //build/config/mac:strip_all has been removed from
+ # the configs variable (as this is how stripping is disabled for a
+ # single target).
+ _strip_all_in_config = false
+ if (defined(invoker.configs)) {
+ foreach(_config, invoker.configs) {
+ if (_config == "//build/config/mac:strip_all") {
+ _strip_all_in_config = true
+ }
+ }
+ }
+
+ if (_strip_all_in_config) {
+ args += [ "-Wcrl,strip,-x,-S" ]
+
+ if (save_unstripped_output) {
+ outputs += [ outputs[0] + ".unstripped" ]
+ args += [ "-Wcrl,unstripped," +
+ rebase_path(get_path_info(outputs[0], "dir"),
+ root_build_dir) ]
+ }
+ }
+ }
}
}
« no previous file with comments | « build/config/mac/BUILD.gn ('k') | build/toolchain/mac/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698