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

Unified Diff: build/config/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/ios/rules.gni ('k') | build/config/mac/base_rules.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/mac/BUILD.gn
diff --git a/build/config/mac/BUILD.gn b/build/config/mac/BUILD.gn
index f800b5a991774c456fb361d60db3a67db675d972..958dea9c4d1a5ca93cc00cd44fc82a42e683b7dd 100644
--- a/build/config/mac/BUILD.gn
+++ b/build/config/mac/BUILD.gn
@@ -3,6 +3,7 @@
# found in the LICENSE file.
import("//build/config/sysroot.gni")
+import("//build/config/ios/ios_sdk.gni")
import("//build/config/mac/mac_sdk.gni")
import("//build/config/mac/symbols.gni")
@@ -49,7 +50,16 @@ config("compiler") {
ldflags = common_mac_flags
- if (save_unstripped_output) {
+ if (is_ios && additional_toolchains != []) {
+ # For fat build, the generation of the dSYM happens after the fat binary has
+ # been created with "lipo" thus the stripping cannot happen at link time but
+ # after running "lipo" too.
+ _save_unstripped_output = false
+ } else {
+ _save_unstripped_output = save_unstripped_output
+ }
+
+ if (_save_unstripped_output) {
ldflags += [ "-Wcrl,unstripped," + rebase_path(root_out_dir) ]
}
}
@@ -107,7 +117,16 @@ config("mac_executable_flags") {
# from a binary, but some targets may wish to specify a saves file to preserve
# specific symbols.
config("strip_all") {
- if (enable_stripping) {
+ if (is_ios && additional_toolchains != []) {
+ # For fat build, the generation of the dSYM happens after the fat binary has
+ # been created with "lipo" thus the stripping cannot happen at link time but
+ # after running "lipo" too.
+ _enable_stripping = false
+ } else {
+ _enable_stripping = enable_stripping
+ }
+
+ if (_enable_stripping) {
ldflags = [ "-Wcrl,strip,-x,-S" ]
}
}
« no previous file with comments | « build/config/ios/rules.gni ('k') | build/config/mac/base_rules.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698