-
Notifications
You must be signed in to change notification settings - Fork 140
/
Copy pathBUILD
38 lines (32 loc) · 826 Bytes
/
BUILD
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
# This example tests that Swift code can be called from Objective-C code and
# vice versa when it is linked into the existing native linking rules for Apple
# platforms.
load(
"//swift:swift.bzl",
"swift_binary",
"swift_library",
)
licenses(["notice"])
objc_library(
name = "PrintStream",
srcs = ["OIPrintStream.m"],
hdrs = ["OIPrintStream.h"],
target_compatible_with = ["@platforms//os:macos"],
)
swift_library(
name = "Printer",
srcs = ["Printer.swift"],
generated_header_name = "generated_header/Printer-Swift.h",
generates_header = True,
deps = [":PrintStream"],
)
objc_library(
name = "main",
srcs = ["main.m"],
target_compatible_with = ["@platforms//os:macos"],
deps = [":Printer"],
)
swift_binary(
name = "objc_interop",
deps = [":main"],
)