Skip to content

Commit 979f825

Browse files
committed
Allow BinaryBuilderToolchains to precompile on other platforms
Really, we should have something smarter here, but `try`/`catch` is hard to beat in terms of expediency.
1 parent 71e537a commit 979f825

File tree

1 file changed

+11
-4
lines changed

1 file changed

+11
-4
lines changed

BinaryBuilderToolchains.jl/src/BinaryBuilderToolchains.jl

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -46,17 +46,24 @@ include("InteractiveUtils.jl")
4646

4747
@setup_workload begin
4848
targets = [
49+
BBHostPlatform(),
4950
Platform("x86_64", "windows"),
5051
Platform("armv7l", "linux"; libc=:musl),
5152
Platform("aarch64", "macos"),
5253
]
5354
platforms = [CrossPlatform(BBHostPlatform() => target) for target in targets]
5455
@compile_workload begin
5556
for platform in platforms
56-
with_toolchains([
57-
CMakeToolchain(platform),
58-
CToolchain(platform),
59-
HostToolsToolchain(platform)]) do prefix, env
57+
# try/catch when running on platforms other than the typical BB2 host platforms
58+
# and where we have incomplete toolchain implementations
59+
try
60+
with_toolchains((p, e) -> nothing, [
61+
CMakeToolchain(platform),
62+
CToolchain(platform),
63+
HostToolsToolchain(platform)
64+
])
65+
catch
66+
@warn("Failed to precompile support for platform", platform)
6067
end
6168
end
6269
end

0 commit comments

Comments
 (0)