From 6f06e570545962f5ea4ff9ace472d28ee2d026dd Mon Sep 17 00:00:00 2001 From: Chris Bracken Date: Fri, 11 Sep 2020 12:27:32 -0700 Subject: [PATCH] Fix OCMock static_library target In flutter/buildroot#399, the static_library target was split into a source_set and static_library target, but this resulted in libocmock being built as an empty 88-byte library. We never caught the issue since this buildroot change was never rolled to the engine. This reverts things back to match how we build other static libraries such as libzip and libxml. This reverts 940dcf6e85301c049576da58b193cf2d903539a2. --- build/secondary/third_party/ocmock/BUILD.gn | 19 ++++++------------- 1 file changed, 6 insertions(+), 13 deletions(-) diff --git a/build/secondary/third_party/ocmock/BUILD.gn b/build/secondary/third_party/ocmock/BUILD.gn index 1d7af70778..29ca2ebbb6 100644 --- a/build/secondary/third_party/ocmock/BUILD.gn +++ b/build/secondary/third_party/ocmock/BUILD.gn @@ -9,13 +9,18 @@ config("ocmock_config") { include_dirs = [ "$ocmock_path" ] } -source_set("ocmock_src") { +static_library("ocmock") { configs -= [ "//build/config/compiler:chromium_code" ] all_dependent_configs = [ ":ocmock_config" ] cflags = [ "-fvisibility=default", "-Wno-misleading-indentation", ] + if (is_ios) { + cflags += [ + "-mios-simulator-version-min=$ios_testing_deployment_target", + ] + } sources = [ "$ocmock_path/OCMock/NSInvocation+OCMAdditions.h", "$ocmock_path/OCMock/NSInvocation+OCMAdditions.m", @@ -91,15 +96,3 @@ source_set("ocmock_src") { "$ocmock_path/OCMock/OCProtocolMockObject.m", ] } - -# This is a static library so it can be used by xcode's build system too. -static_library("ocmock") { - if (is_ios) { - cflags = [ - "-mios-simulator-version-min=$ios_testing_deployment_target", - ] - } - public_deps = [ - ":ocmock_src", - ] -}