Index: base/BUILD.gn |
diff --git a/base/BUILD.gn b/base/BUILD.gn |
index 6ef6cd351494b18e4df8baf97c3e335a5a6cd235..efab95bcafc5be34e569b12d227be00e3a109a08 100644 |
--- a/base/BUILD.gn |
+++ b/base/BUILD.gn |
@@ -429,6 +429,7 @@ component("base") { |
"mac/scoped_aedesc.h", |
"mac/scoped_authorizationref.h", |
"mac/scoped_block.h", |
+ "mac/scoped_block.mm", |
"mac/scoped_cftyperef.h", |
"mac/scoped_ioobject.h", |
"mac/scoped_ioplugininterface.h", |
@@ -440,6 +441,7 @@ component("base") { |
"mac/scoped_nsautorelease_pool.h", |
"mac/scoped_nsautorelease_pool.mm", |
"mac/scoped_nsobject.h", |
+ "mac/scoped_nsobject.mm", |
"mac/scoped_objc_class_swizzler.h", |
"mac/scoped_objc_class_swizzler.mm", |
"mac/scoped_sending_event.h", |
@@ -1392,6 +1394,8 @@ component("base") { |
"mac/mach_logging.h", |
"mac/objc_property_releaser.h", |
"mac/objc_property_releaser.mm", |
+ "mac/scoped_block.h", |
+ "mac/scoped_block.mm", |
"mac/scoped_mach_port.cc", |
"mac/scoped_mach_port.h", |
"mac/scoped_mach_vm.cc", |
@@ -1399,8 +1403,10 @@ component("base") { |
"mac/scoped_nsautorelease_pool.h", |
"mac/scoped_nsautorelease_pool.mm", |
"mac/scoped_nsobject.h", |
+ "mac/scoped_nsobject.mm", |
"mac/scoped_objc_class_swizzler.h", |
"mac/scoped_objc_class_swizzler.mm", |
+ "mac/scoped_typeref.h", |
"memory/shared_memory_posix.cc", |
"message_loop/message_pump_mac.h", |
"message_loop/message_pump_mac.mm", |
@@ -1650,6 +1656,22 @@ bundle_data("base_unittests_bundle_data") { |
] |
} |
+if (is_ios || is_mac) { |
+ source_set("base_unittests_arc") { |
+ testonly = true |
+ set_sources_assignment_filter([]) |
+ sources = [ |
+ "mac/scoped_nsobject_unittest_arc.mm", |
+ ] |
+ set_sources_assignment_filter(sources_assignment_filter) |
+ configs += [ "//build/config/compiler:enable_arc" ] |
+ deps = [ |
+ ":base", |
+ "//testing/gtest", |
+ ] |
+ } |
+} |
+ |
test("base_unittests") { |
sources = [ |
"allocator/tcmalloc_unittest.cc", |
@@ -1920,6 +1942,10 @@ test("base_unittests") { |
"//third_party/icu", |
] |
+ if (is_ios || is_mac) { |
+ deps += [ ":base_unittests_arc" ] |
+ } |
+ |
public_deps = [ |
":base_unittests_bundle_data", |
] |