1

reduce number of zig tools

* cc: bazel supports only cpp
* wasm-ld: we do not support wasm here. Can be re-added with proper target config.
* coff: we use ld64.lld for some reason (I don't know enough about Windows to tell)

Also, now creating the tools where it makes sense to add for the target only.
This commit is contained in:
Motiejus Jakštys 2022-12-18 06:13:32 +02:00
parent bd243aad71
commit 872bf302b0

View File

@ -78,15 +78,10 @@ def toolchains(
_ZIG_TOOLS = [ _ZIG_TOOLS = [
"c++", "c++",
"cc",
"ar", "ar",
"ld.lld", # ELF "build-exe",
"ld64.lld", # Mach-O "build-lib",
"lld-link", # COFF "build-obj",
"wasm-ld", # WebAssembly
"build-exe", # zig
"build-lib", # zig
"build-obj", # zig
] ]
_ZIG_TOOL_WRAPPER_WINDOWS_CACHE = """@echo off _ZIG_TOOL_WRAPPER_WINDOWS_CACHE = """@echo off
@ -222,8 +217,8 @@ def _zig_repository_impl(repository_ctx):
sha256 = zig_sha256, sha256 = zig_sha256,
) )
for zig_tool in _ZIG_TOOLS: for target_config in target_structs():
for target_config in target_structs(): for zig_tool in _ZIG_TOOLS + target_config.tool_paths.values():
zig_tool_wrapper = _zig_tool_wrapper( zig_tool_wrapper = _zig_tool_wrapper(
zig_tool, zig_tool,
os == "windows", os == "windows",