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

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

Issue 1371153005: Mov Linux & Mac GN compiler flags to separate configs. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 2 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 | build/config/linux/BUILD.gn » ('j') | 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 8cf8367394883b517b60dd9ee6850225a859cec0..be61892898d76184f07b263c0ffc411503b615ee 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -110,6 +110,8 @@ config("compiler") {
configs += [ "//build/config/win:compiler" ]
} else if (is_android) {
configs += [ "//build/config/android:compiler" ]
+ } else if (is_linux) {
+ configs += [ "//build/config/linux:compiler" ]
}
# In general, Windows is totally different, but all the other builds share
@@ -172,45 +174,9 @@ config("compiler") {
"trim string") ]
}
- # Mac-specific compiler flags setup.
- # ----------------------------------
- if (is_mac || is_ios) {
- # These flags are shared between the C compiler and linker.
- common_mac_flags = []
-
- # CPU architecture.
- if (current_cpu == "x64") {
- common_mac_flags += [
- "-arch",
- "x86_64",
- ]
- } else if (current_cpu == "x86") {
- common_mac_flags += [
- "-arch",
- "i386",
- ]
- } else if (current_cpu == "arm") {
- # TODO(GYP): we may need to distinguish between "arm64", "armv7",
- # and "armv7s" for iOS, and hence need multiple current_cpu values
- # rather than just "arm".
- common_mac_flags += [
- "-arch",
- "arm64",
- ]
- }
-
- cflags += common_mac_flags
-
- # Without this, the constructors and destructors of a C++ object inside
- # an Objective C struct won't be called, which is very bad.
- cflags_objcc += [ "-fobjc-call-cxx-cdtors" ]
-
- cflags_c += [ "-std=c99" ]
-
- ldflags += common_mac_flags
- } else if (is_posix) {
- # Non-Mac Posix compiler flags setup.
- # -----------------------------------
+ # Non-Mac Posix compiler flags setup.
+ # -----------------------------------
+ if (is_posix && !(is_mac || is_ios)) {
if (enable_profiling && !is_debug) {
# The GYP build spams this define into every compilation unit, as we do
# here, but it only appears to be used in base and a couple other places.
@@ -391,10 +357,6 @@ config("compiler") {
# Linux-specific compiler flags setup.
# ------------------------------------
- if (is_linux) {
- cflags += [ "-pthread" ]
- ldflags += [ "-pthread" ]
- }
if (use_gold) {
ldflags += [
"-B$gold_path",
« no previous file with comments | « no previous file | build/config/linux/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698