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") { |