From 94a5fd105a0bba9ae264d7a060cf7b41b0245b22 Mon Sep 17 00:00:00 2001 From: Alex Eagle Date: Wed, 18 Sep 2024 14:35:19 -0700 Subject: [PATCH] chore: simplify --- .bazelrc | 10 ++++++++-- .github/workflows/build.yaml | 2 -- MODULE.bazel.windows | 2 -- 3 files changed, 8 insertions(+), 6 deletions(-) delete mode 100644 MODULE.bazel.windows diff --git a/.bazelrc b/.bazelrc index d345358..0255254 100644 --- a/.bazelrc +++ b/.bazelrc @@ -4,14 +4,20 @@ common --enable_platform_specific_config # off: Links all targets in mostly static mode. If -static is set in linkopts, targets will change to fully static. build --dynamic_mode=off -# On linux (targetting linux and macos) use the zig toolchain from hermetic_cc_toolchain -build:linux --platforms @zig_sdk//libc_aware/platform:linux_amd64_musl # Don't clobber bazel-out/[platform]/bin build --experimental_platform_in_output_dir +# On Linux (targetting linux and macos) use the zig toolchain from hermetic_cc_toolchain +build:linux --platforms @zig_sdk//libc_aware/platform:linux_amd64_musl build:linux --repo_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 build:linux --action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 build:linux --host_action_env=BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 + +# On Windows, use the host toolchain +# NB: after https://github.com/uber/hermetic_cc_toolchain/pull/190 is included in a release, +# this flag should no longer be needed. +build:windows --noincompatible_enable_cc_toolchain_resolution + build --incompatible_strict_action_env build --features=thin_lto diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml index 0e407ba..8540ebd 100644 --- a/.github/workflows/build.yaml +++ b/.github/workflows/build.yaml @@ -45,8 +45,6 @@ jobs: steps: - uses: actions/checkout@v4 - run: | - rm MODULE.bazel - mv MODULE.bazel.windows MODULE.bazel bazel build @libarchive//tar mv bazel-bin/external/libarchive~/tar/bsdtar.exe tar_windows_x86_64.exe - name: smoke test diff --git a/MODULE.bazel.windows b/MODULE.bazel.windows deleted file mode 100644 index 69c60cd..0000000 --- a/MODULE.bazel.windows +++ /dev/null @@ -1,2 +0,0 @@ -bazel_dep(name = "aspect_bazel_lib", version = "2.5.3") -bazel_dep(name = "libarchive", version = "3.7.5")