From 61491dac5e37cbc43abea2f3493b6e699eb383c1 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Motiejus=20Jak=C5=A1tys?= Date: Thu, 10 Jun 2021 16:12:50 +0300 Subject: [PATCH] rename libc name; comment out default toolchain --- .build.yml | 6 +++--- test/BUILD | 2 +- toolchain/defs.bzl | 8 ++++---- 3 files changed, 8 insertions(+), 8 deletions(-) diff --git a/.build.yml b/.build.yml index 56df480..305e9f3 100644 --- a/.build.yml +++ b/.build.yml @@ -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 \ diff --git a/test/BUILD b/test/BUILD index c9a1206..3f85c59 100644 --- a/test/BUILD +++ b/test/BUILD @@ -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"], diff --git a/toolchain/defs.bzl b/toolchain/defs.bzl index ee90492..5e1f144 100644 --- a/toolchain/defs.bzl +++ b/toolchain/defs.bzl @@ -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", )