summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--build/config/compiler/BUILD.gn10
-rw-r--r--ios/third_party/gcdwebserver/BUILD.gn13
-rw-r--r--ios/third_party/ochamcrest/BUILD.gn13
3 files changed, 22 insertions, 14 deletions
diff --git a/build/config/compiler/BUILD.gn b/build/config/compiler/BUILD.gn
index 3b125c2..76a42eb 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
+ }
+}
diff --git a/ios/third_party/gcdwebserver/BUILD.gn b/ios/third_party/gcdwebserver/BUILD.gn
index 21b993c..5207f75 100644
--- a/ios/third_party/gcdwebserver/BUILD.gn
+++ b/ios/third_party/gcdwebserver/BUILD.gn
@@ -2,7 +2,8 @@
# Use of this source code is governed by a BSD-style license that can be
# found in the LICENSE file.
-config("public_config") {
+config("config") {
+ visibility = [ ":gcdwebserver" ]
libs = [
"CFNetwork.framework",
"MobileCoreServices.framework",
@@ -16,14 +17,13 @@ config("public_config") {
]
}
-config("internal_config") {
+config("private_config") {
visibility = [ ":gcdwebserver" ]
# TODO(crbug.com/569158): Suppresses warnings that are treated as errors
# when minimum iOS version support is increased to iOS 9 and up.
# This should be removed once all deprecation violations have been fixed.
cflags = [ "-Wno-deprecated-declarations" ]
- cflags_objc = [ "-fobjc-arc" ]
}
source_set("gcdwebserver") {
@@ -60,6 +60,9 @@ source_set("gcdwebserver") {
"src/GCDWebServer/Responses/GCDWebServerStreamedResponse.m",
]
- public_configs = [ ":public_config" ]
- configs += [ ":internal_config" ]
+ public_configs = [ ":config" ]
+ configs += [
+ ":private_config",
+ "//build/config/compiler:enable_arc",
+ ]
}
diff --git a/ios/third_party/ochamcrest/BUILD.gn b/ios/third_party/ochamcrest/BUILD.gn
index 527e5f2..47f6135 100644
--- a/ios/third_party/ochamcrest/BUILD.gn
+++ b/ios/third_party/ochamcrest/BUILD.gn
@@ -175,25 +175,20 @@ copy("ochamcrest_copy_files") {
]
}
-config("ochamcrest_config") {
+config("config") {
visibility = [ ":ochamcrest" ]
libs = [ "XCTest.framework" ]
include_dirs = [ "$root_gen_dir/ios/third_party/ochamcrest" ]
}
-config("ochamcrest_private_config") {
- visibility = [ ":ochamcrest" ]
- cflags_objc = [ "-fobjc-arc" ]
-}
-
source_set("ochamcrest") {
testonly = true
configs += [
- ":ochamcrest_config",
- ":ochamcrest_private_config",
+ ":config",
+ "//build/config/compiler:enable_arc",
"//build/config/compiler:no_chromium_code",
]
- public_configs = [ ":ochamcrest_config" ]
+ public_configs = [ ":config" ]
public_deps = [
":ochamcrest_copy_files",
]