1

zig_include_root: fixes

- do not pass where it's unnecessary
- remove trailing slash. That conflicts with ziglang/zig/pull/13596
This commit is contained in:
Motiejus Jakštys 2022-11-21 06:08:22 +02:00
parent dd4239407e
commit 88e7e47ed2
3 changed files with 7 additions and 8 deletions

View File

@ -18,5 +18,4 @@ exports_files([
declare_cc_toolchains(
os = {os},
zig_sdk_path = {zig_sdk_path},
zig_include_root = {zig_include_root},
)

View File

@ -75,11 +75,11 @@ def toolchains(
host_platform_sha256 = host_platform_sha256,
host_platform_ext = host_platform_ext,
host_platform_include_root = {
"linux-aarch64": "lib/zig/",
"linux-x86_64": "lib/",
"macos-aarch64": "lib/",
"macos-x86_64": "lib/zig/",
"windows-x86_64": "lib/",
"linux-aarch64": "lib/zig",
"linux-x86_64": "lib",
"macos-aarch64": "lib",
"macos-x86_64": "lib/zig",
"windows-x86_64": "lib",
},
)
@ -330,6 +330,6 @@ def declare_files(os, zig_include_root):
for target_config in target_structs():
for d in _DEFAULT_INCLUDE_DIRECTORIES + target_config.includes:
d = zig_include_root + d
d = zig_include_root + ("\\" if os == "windows" else "/") + d
if d not in lazy_filegroups:
lazy_filegroups[d] = filegroup(name = d, srcs = native.glob([d + "/**"]))

View File

@ -11,7 +11,7 @@ DEFAULT_TOOL_PATHS = {
"strip": "/usr/bin/false",
}.items()
def declare_cc_toolchains(os, zig_sdk_path, zig_include_root):
def declare_cc_toolchains(os, zig_sdk_path):
for target_config in target_structs():
gotarget = target_config.gotarget
zigtarget = target_config.zigtarget