Skip to content

Commit 1fb32b5

Browse files
authored
Update build-using-self (#9496)
Update the build-using-self to the `swift-build` and `swift-test` executable targets are built using the native build system. Fixes: #9070
1 parent 3af203f commit 1fb32b5

File tree

1 file changed

+17
-1
lines changed

1 file changed

+17
-1
lines changed

Utilities/build-using-self

Lines changed: 17 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -132,13 +132,25 @@ def log_environment() -> None:
132132
logging.info(" --> %s=%r", key, value)
133133

134134

135+
BUILD_OVERRIDES: t.List[str] = [
136+
"--build-system",
137+
"native",
138+
]
139+
140+
135141
def get_swiftpm_bin_dir(
136142
*,
137143
global_args: t.List[str],
138144
) -> pathlib.Path:
139145
logging.info("Retrieving Swift PM binary directory.")
140146
swiftpm_bin_dir = pathlib.Path(
141-
call_output(["swift", "build", *global_args, "--show-bin-path"])
147+
call_output([
148+
"swift",
149+
"build",
150+
*global_args,
151+
*BUILD_OVERRIDES,
152+
"--show-bin-path",
153+
])
142154
)
143155
logging.info("SwiftPM BIN DIR: %s", swiftpm_bin_dir)
144156
return swiftpm_bin_dir
@@ -245,6 +257,7 @@ def main() -> None:
245257
"swift",
246258
"package",
247259
*global_args,
260+
*BUILD_OVERRIDES,
248261
"clean",
249262
]
250263
)
@@ -257,6 +270,7 @@ def main() -> None:
257270
"swift",
258271
"package",
259272
*global_args,
273+
*BUILD_OVERRIDES,
260274
"update",
261275
]
262276
)
@@ -268,6 +282,7 @@ def main() -> None:
268282
"swift",
269283
"build",
270284
*global_args,
285+
*BUILD_OVERRIDES,
271286
"--build-tests",
272287
*ignore_args,
273288
*args.additional_build_args.split(" ")
@@ -281,6 +296,7 @@ def main() -> None:
281296
"swift",
282297
"run",
283298
*global_args,
299+
*BUILD_OVERRIDES,
284300
*ignore_args,
285301
*args.additional_run_args.split(" "),
286302
"swift-test",

0 commit comments

Comments
 (0)