rename libc name; comment out default toolchain
This commit is contained in:
parent
2944fe56df
commit
61491dac5e
@ -10,9 +10,9 @@ tasks:
|
||||
curl -L https://github.com/bazelbuild/bazelisk/releases/download/v1.9.0/bazelisk-linux-amd64 \
|
||||
-o bazel
|
||||
chmod +x bazel
|
||||
- test_default: |
|
||||
cd bazel-zig-cc; ../bazel run \
|
||||
//test:gognu
|
||||
#- test_default: |
|
||||
# cd bazel-zig-cc; ../bazel run \
|
||||
# //test:gognu
|
||||
- test_x86_64-linux-gnu: |
|
||||
cd bazel-zig-cc; ../bazel run \
|
||||
--platforms @zig_sdk//:x86_64-linux-gnu \
|
||||
|
@ -19,7 +19,7 @@ go_binary(
|
||||
embed = [":go_lib"],
|
||||
static = "on",
|
||||
target_compatible_with = select({
|
||||
"@platforms//os:linux": ["@zig_sdk//:musl"],
|
||||
"@platforms//os:linux": ["@zig_sdk//:libc_musl"],
|
||||
"//conditions:default": [],
|
||||
}),
|
||||
visibility = ["//visibility:public"],
|
||||
|
@ -54,7 +54,7 @@ TARGET_CONFIGS_LISTOFLISTS = [[
|
||||
constraint_values=[
|
||||
"@platforms//os:linux",
|
||||
"@platforms//cpu:{}".format(cpu),
|
||||
":gnu.2.19",
|
||||
":libc_gnu",
|
||||
],
|
||||
tool_paths={"ld": "ld.lld"},
|
||||
),
|
||||
@ -72,7 +72,7 @@ TARGET_CONFIGS_LISTOFLISTS = [[
|
||||
constraint_values=[
|
||||
"@platforms//os:linux",
|
||||
"@platforms//cpu:{}".format(cpu),
|
||||
":musl",
|
||||
":libc_musl",
|
||||
],
|
||||
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_value(
|
||||
name = "musl",
|
||||
name = "libc_musl",
|
||||
constraint_setting = ":libc",
|
||||
)
|
||||
|
||||
native.constraint_value(
|
||||
name = "gnu.2.19",
|
||||
name = "libc_gnu",
|
||||
constraint_setting = ":libc",
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user