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

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

Issue 1233683003: Pass corresponding C/C++ flags to ObjC/C++ (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 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 | « no previous file | build/config/gcc/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 1590a51d699903beb4f1a1b96b1c37eb39f254ab..5579104dd2ec8680334d7956de4f775255fea801 100644
--- a/build/config/compiler/BUILD.gn
+++ b/build/config/compiler/BUILD.gn
@@ -90,6 +90,8 @@ config("compiler") {
cflags = []
cflags_c = []
cflags_cc = []
+ cflags_objc = []
+ cflags_objcc = []
ldflags = []
defines = []
@@ -127,6 +129,7 @@ config("compiler") {
} else {
cflags += [ "-m64" ]
}
+
# TODO(thakis): Remove this once llvm.org/PR24167 is fixed.
if (is_asan) {
cflags += [ "/fallback" ]
@@ -269,7 +272,7 @@ config("compiler") {
# 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_objcc += [ "-fobjc-call-cxx-cdtors" ]
cflags_c += [ "-std=c99" ]
@@ -569,6 +572,10 @@ config("compiler") {
}
}
}
+
+ # Pass the same C/C++ flags to the objective C/C++ compiler.
+ cflags_objc += cflags_c
+ cflags_objcc += cflags_cc
}
config("compiler_arm_fpu") {
« no previous file with comments | « no previous file | build/config/gcc/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698