Skip to content

Commit caab6bb

Browse files
authored
[bazel] Add new targets (#2645)
1 parent 4affc21 commit caab6bb

File tree

3 files changed

+21
-12
lines changed

3 files changed

+21
-12
lines changed

.bazelrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
common --enable_bzlmod
2+
common --incompatible_disallow_empty_glob
23
common --incompatible_use_host_features
34
common --lockfile_mode=off
45

BUILD.bazel

Lines changed: 18 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ swift_syntax_library(
3636
":SwiftSyntax",
3737
":SwiftSyntaxMacroExpansion",
3838
":SwiftSyntaxMacros",
39+
":_SwiftSyntaxCShims",
3940
],
4041
)
4142

@@ -82,6 +83,14 @@ swift_syntax_test(
8283
],
8384
)
8485

86+
swift_syntax_library(
87+
name = "SwiftLibraryPluginProvider",
88+
deps = [
89+
":SwiftCompilerPluginMessageHandling",
90+
":SwiftSyntaxMacros",
91+
],
92+
)
93+
8594
swift_syntax_library(
8695
name = "SwiftOperators",
8796
deps = [
@@ -161,7 +170,7 @@ swift_syntax_library(
161170
":SwiftSyntax509",
162171
":SwiftSyntax510",
163172
":SwiftSyntax600",
164-
":_AtomicBool",
173+
":_SwiftSyntaxCShims",
165174
],
166175
)
167176

@@ -281,15 +290,6 @@ swift_syntax_test(
281290
],
282291
)
283292

284-
cc_library(
285-
name = "_AtomicBool",
286-
srcs = glob(["Sources/_AtomicBool/src/*.c"]),
287-
hdrs = glob(["Sources/_AtomicBool/include/*.h"]),
288-
includes = ["Sources/_AtomicBool/include"],
289-
tags = ["swift_module=_AtomicBool"],
290-
visibility = ["//visibility:private"],
291-
)
292-
293293
cc_library(
294294
name = "_InstructionCounter",
295295
srcs = glob(["Sources/_InstructionCounter/src/*.c"]),
@@ -299,6 +299,14 @@ cc_library(
299299
visibility = ["//visibility:private"],
300300
)
301301

302+
cc_library(
303+
name = "_SwiftSyntaxCShims",
304+
hdrs = glob(["Sources/_SwiftSyntaxCShims/include/*.h"]),
305+
includes = ["Sources/_SwiftSyntaxCShims/include"],
306+
tags = ["swift_module=_SwiftSyntaxCShims"],
307+
visibility = ["//visibility:private"],
308+
)
309+
302310
swift_syntax_library(
303311
name = "_SwiftSyntaxTestSupport",
304312
testonly = True,

utils/bazel/swift_syntax_library.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,8 @@ def swift_syntax_library(name, deps, srcs = None, testonly = False):
2626
def swift_syntax_test(name, deps):
2727
srcs = native.glob(
2828
["Tests/{}/**/*.swift".format(name)],
29+
# These tests load source files they don't have access to in the iOS test bundle with bazel.
30+
exclude = ["**/StringLiteralRepresentedLiteralValueTests.swift"],
2931
allow_empty = False,
3032
)
3133

@@ -53,7 +55,5 @@ def swift_syntax_test(name, deps):
5355
# Keep in sync with Package.swift
5456
minimum_os_version = "13.0",
5557
tags = ["exclusive"],
56-
# These tests load source files they don't have access to in the iOS test bundle with bazel.
57-
test_filter = "-SwiftParserTest.StringLiteralRepresentedLiteralValueTests",
5858
runner = "//:ios_test_runner",
5959
)

0 commit comments

Comments
 (0)