Skip to content

Commit ff577ee

Browse files
committed
Exclude XcodeSupport on Linux under Bazel
1 parent 241bbdc commit ff577ee

File tree

3 files changed

+29
-23
lines changed

3 files changed

+29
-23
lines changed

MODULE.bazel

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ bazel_dep(name = "rules_swift", version = "2.3.0")
99
bazel_dep(name = "rules_apple", version = "3.16.0")
1010
bazel_dep(name = "bazel_skylib", version = "1.7.1")
1111
bazel_dep(name = "apple_support", version = "1.17.1")
12+
bazel_dep(name = "platforms", version = "0.0.11")
1213

1314
# Swift dependencies
1415
bazel_dep(name = "aexml", version = "4.7.0")

MODULE.bazel.lock

Lines changed: 18 additions & 17 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Sources/BUILD.bazel

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -122,6 +122,12 @@ swift_library(
122122
],
123123
)
124124

125+
_PROJECT_DRIVERS_DEPS = [
126+
"//Sources:Indexer",
127+
"//Sources:Shared",
128+
"//Sources:SourceGraph",
129+
]
130+
125131
swift_library(
126132
name = "ProjectDrivers",
127133
srcs = [
@@ -133,12 +139,10 @@ swift_library(
133139
"ProjectDrivers/XcodeProjectDriver.swift",
134140
],
135141
module_name = "ProjectDrivers",
136-
deps = [
137-
"//Sources:Indexer",
138-
"//Sources:Shared",
139-
"//Sources:SourceGraph",
140-
"//Sources:XcodeSupport",
141-
],
142+
deps = select({
143+
"@platforms//os:macos": _PROJECT_DRIVERS_DEPS + ["//Sources:XcodeSupport"],
144+
"//conditions:default": _PROJECT_DRIVERS_DEPS,
145+
}),
142146
)
143147

144148
swift_library(

0 commit comments

Comments
 (0)