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

Unified Diff: build/toolchain/mac/BUILD.gn

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/base_rules.gni ('k') | build/toolchain/mac/linker_driver.py » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/toolchain/mac/BUILD.gn
diff --git a/build/toolchain/mac/BUILD.gn b/build/toolchain/mac/BUILD.gn
index 10efb0942063212e029a7f5d5494be5071231eee..c330f6447dd986a1a0f4a1add0db34be036a71d0 100644
--- a/build/toolchain/mac/BUILD.gn
+++ b/build/toolchain/mac/BUILD.gn
@@ -92,6 +92,17 @@ template("mac_toolchain") {
"TOOL_VERSION=${tool_versions.linker_driver} " +
rebase_path("//build/toolchain/mac/linker_driver.py", root_build_dir)
+ if (is_ios && additional_toolchains != []) {
+ # For a fat build, the generation of dSYM needs to be performed after the
+ # generation of the fat binaries using "lipo". So disable the generation
+ # of the dSYM for intermediate architecture specific binaries.
+ _enable_dsyms = false
+ _save_unstripped_output = false
+ } else {
+ _enable_dsyms = enable_dsyms
+ _save_unstripped_output = save_unstripped_output
+ }
+
# Make these apply to all tools below.
lib_switch = "-l"
lib_dir_switch = "-L"
@@ -102,7 +113,7 @@ template("mac_toolchain") {
object_subdir = "{{target_out_dir}}/{{label_name}}"
# If dSYMs are enabled, this flag will be added to the link tools.
- if (enable_dsyms) {
+ if (_enable_dsyms) {
dsym_switch = " -Wcrl,dsym," + rebase_path(root_out_dir) + " "
_dsym_output =
"{{root_out_dir}}/{{target_output_name}}{{output_extension}}.dSYM/"
@@ -110,7 +121,7 @@ template("mac_toolchain") {
dsym_switch = ""
}
- if (save_unstripped_output) {
+ if (_save_unstripped_output) {
_unstripped_output = "{{root_out_dir}}/{{target_output_name}}{{output_extension}}.unstripped"
}
@@ -237,10 +248,10 @@ template("mac_toolchain") {
link_output = dylib
depend_output = tocname
- if (enable_dsyms) {
+ if (_enable_dsyms) {
outputs += [ _dsym_output ]
}
- if (save_unstripped_output) {
+ if (_save_unstripped_output) {
outputs += [ _unstripped_output ]
}
}
@@ -271,10 +282,10 @@ template("mac_toolchain") {
sofile,
]
- if (enable_dsyms) {
+ if (_enable_dsyms) {
outputs += [ _dsym_output ]
}
- if (save_unstripped_output) {
+ if (_save_unstripped_output) {
outputs += [ _unstripped_output ]
}
}
@@ -298,10 +309,10 @@ template("mac_toolchain") {
outfile,
]
- if (enable_dsyms) {
+ if (_enable_dsyms) {
outputs += [ _dsym_output ]
}
- if (save_unstripped_output) {
+ if (_save_unstripped_output) {
outputs += [ _unstripped_output ]
}
« no previous file with comments | « build/config/mac/base_rules.gni ('k') | build/toolchain/mac/linker_driver.py » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698