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

Unified Diff: build/config/compiler/BUILD.gn

Issue 2093833002: [Mac/GN] Do not use ELF-only cflags on Mac. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 4 years, 6 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/compiler/BUILD.gn
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index f9e01af1968300094eb290adc62c0786902d420d..75779d4c19d011d5f478b9e06c87aea8e8d531a1 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -1226,16 +1226,7 @@ if (is_win) {
}
}
} else {
- common_optimize_on_cflags = [
- # Don't emit the GCC version ident directives, they just end up in the
- # .comment section taking up binary size.
- "-fno-ident",
-
- # Put data and code in their own sections, so that unused symbols
- # can be removed at link time with --gc-sections.
- "-fdata-sections",
- "-ffunction-sections",
- ]
+ common_optimize_on_cflags = []
common_optimize_on_ldflags = []
if (is_android) {
@@ -1262,7 +1253,19 @@ if (is_win) {
common_optimize_on_ldflags += [ "-Wl,-dead_strip" ]
}
} else {
- # Non-Mac Posix linker flags.
+ # Non-Mac Posix flags.
+
+ common_optimize_on_cflags += [
+ # Don't emit the GCC version ident directives, they just end up in the
+ # .comment section taking up binary size.
+ "-fno-ident",
+
+ # Put data and code in their own sections, so that unused symbols
+ # can be removed at link time with --gc-sections.
+ "-fdata-sections",
+ "-ffunction-sections",
+ ]
+
common_optimize_on_ldflags += [
# Specifically tell the linker to perform optimizations.
# See http://lwn.net/Articles/192624/ .
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698