1

rename libc name; comment out default toolchain

This commit is contained in:
Motiejus Jakštys 2021-06-10 16:12:50 +03:00 committed by Motiejus Jakštys
parent 2944fe56df
commit 61491dac5e
3 changed files with 8 additions and 8 deletions

View File

@ -10,9 +10,9 @@ tasks:
curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.9.0/bazelisk-linux-amd64 \ curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.9.0/bazelisk-linux-amd64 \
-o bazel -o bazel
chmod +x bazel chmod +x bazel
- test_default: | #- test_default: |
cd bazel-zig-cc; ../bazel run \ # cd bazel-zig-cc; ../bazel run \
//test:gognu # //test:gognu
- test_x86_64-linux-gnu: | - test_x86_64-linux-gnu: |
cd bazel-zig-cc; ../bazel run \ cd bazel-zig-cc; ../bazel run \
--platforms @zig_sdk//:x86_64-linux-gnu \ --platforms @zig_sdk//:x86_64-linux-gnu \

View File

@ -19,7 +19,7 @@ go_binary(
embed = [":go_lib"], embed = [":go_lib"],
static = "on", static = "on",
target_compatible_with = select({ target_compatible_with = select({
"@platforms//os:linux": ["@zig_sdk//:musl"], "@platforms//os:linux": ["@zig_sdk//:libc_musl"],
"//conditions:default": [], "//conditions:default": [],
}), }),
visibility = ["//visibility:public"], visibility = ["//visibility:public"],

View File

@ -54,7 +54,7 @@ TARGET_CONFIGS_LISTOFLISTS = [[
constraint_values=[ constraint_values=[
"@platforms//os:linux", "@platforms//os:linux",
"@platforms//cpu:{}".format(cpu), "@platforms//cpu:{}".format(cpu),
":gnu.2.19", ":libc_gnu",
], ],
tool_paths={"ld": "ld.lld"}, tool_paths={"ld": "ld.lld"},
), ),
@ -72,7 +72,7 @@ TARGET_CONFIGS_LISTOFLISTS = [[
constraint_values=[ constraint_values=[
"@platforms//os:linux", "@platforms//os:linux",
"@platforms//cpu:{}".format(cpu), "@platforms//cpu:{}".format(cpu),
":musl", ":libc_musl",
], ],
tool_paths={"ld": "ld.lld"}, tool_paths={"ld": "ld.lld"},
), ),
@ -189,12 +189,12 @@ def zig_build_macro(absolute_path, zig_include_root):
native.constraint_setting(name = "libc") native.constraint_setting(name = "libc")
native.constraint_value( native.constraint_value(
name = "musl", name = "libc_musl",
constraint_setting = ":libc", constraint_setting = ":libc",
) )
native.constraint_value( native.constraint_value(
name = "gnu.2.19", name = "libc_gnu",
constraint_setting = ":libc", constraint_setting = ":libc",
) )