Index: build/config/compiler/BUILD.gn |
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn |
index 3b125c21c2472934dc470e0738aa268dfe7ada57..76a42eb399d573f7fce1ad3c5897554af7ce640b 100644 |
--- a/build/config/compiler/BUILD.gn |
+++ b/build/config/compiler/BUILD.gn |
@@ -1335,3 +1335,13 @@ config("default_symbols") { |
assert(false) |
} |
} |
+ |
+if (is_ios || is_mac) { |
+ # On Mac and iOS, this enables support for ARC (automatic ref-counting). |
+ # See http://clang.llvm.org/docs/AutomaticReferenceCounting.html. |
+ config("enable_arc") { |
+ common_flags = [ "-fobjc-arc" ] |
+ cflags_objc = common_flags |
+ cflags_objcc = common_flags |
+ } |
+} |