Skip to content

Commit f83d1d7

Browse files
authored
Fix OCMock static_library target (flutter#402)
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 940dcf6.
1 parent ee71277 commit f83d1d7

File tree

1 file changed

+6
-13
lines changed
  • build/secondary/third_party/ocmock

1 file changed

+6
-13
lines changed

build/secondary/third_party/ocmock/BUILD.gn

Lines changed: 6 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -9,13 +9,18 @@ config("ocmock_config") {
99
include_dirs = [ "$ocmock_path" ]
1010
}
1111

12-
source_set("ocmock_src") {
12+
static_library("ocmock") {
1313
configs -= [ "//build/config/compiler:chromium_code" ]
1414
all_dependent_configs = [ ":ocmock_config" ]
1515
cflags = [
1616
"-fvisibility=default",
1717
"-Wno-misleading-indentation",
1818
]
19+
if (is_ios) {
20+
cflags += [
21+
"-mios-simulator-version-min=$ios_testing_deployment_target",
22+
]
23+
}
1924
sources = [
2025
"$ocmock_path/OCMock/NSInvocation+OCMAdditions.h",
2126
"$ocmock_path/OCMock/NSInvocation+OCMAdditions.m",
@@ -91,15 +96,3 @@ source_set("ocmock_src") {
9196
"$ocmock_path/OCMock/OCProtocolMockObject.m",
9297
]
9398
}
94-
95-
# This is a static library so it can be used by xcode's build system too.
96-
static_library("ocmock") {
97-
if (is_ios) {
98-
cflags = [
99-
"-mios-simulator-version-min=$ios_testing_deployment_target",
100-
]
101-
}
102-
public_deps = [
103-
":ocmock_src",
104-
]
105-
}

0 commit comments

Comments
 (0)