diff options
author | Fabian Meumertzheim <fabian@meumertzhe.im> | 2021-12-15 12:00:37 +0100 |
---|---|---|
committer | Fabian Meumertzheim <fabian@meumertzhe.im> | 2021-12-15 12:40:59 +0100 |
commit | 726cc6bd0c0e26378574f74b712de948e56664ec (patch) | |
tree | c5880647e8b29782d15be0c99a60e56fed6f8a02 | |
parent | 3707d34841174b4b5fa3acef5e9c4d7e5314a4bf (diff) | |
download | jazzer-api-726cc6bd0c0e26378574f74b712de948e56664ec.tar.gz |
Fix failure with --config=toolchain
Since our toolchain is loaded dynamically depending on the OS and
architecture, we can't have a static --extra_toolchains in our .bazelrc.
Instead, enable the toolchains in the specific GitHub Actions.
-rw-r--r-- | .bazelrc | 2 | ||||
-rw-r--r-- | .github/workflows/release.yml | 4 | ||||
-rw-r--r-- | .github/workflows/run-all-tests.yml | 2 | ||||
-rw-r--r-- | docker/jazzer/Dockerfile | 3 |
4 files changed, 6 insertions, 5 deletions
@@ -30,7 +30,7 @@ test:windows --noincompatible_strict_action_env run:windows --noincompatible_strict_action_env # Toolchain -build:toolchain --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux,@llvm_toolchain//:cc-toolchain-x86_64-darwin +# Since the toolchain is conditional on OS and architecture, set it on the particular GitHub Action. build:toolchain --//third_party:toolchain # CI tests (not using the toolchain to test OSS-Fuzz & local compatibility) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 0769deca..b2d5566d 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -13,10 +13,10 @@ jobs: include: - os: ubuntu-latest arch: "linux" - bazel_args: "--config=toolchain" + bazel_args: "--config=toolchain --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux" - os: macos-10.15 arch: "macos-x86_64" - bazel_args: "--config=toolchain" + bazel_args: "--config=toolchain --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-darwin" - os: windows-2016 arch: "windows" bazel_args: "" diff --git a/.github/workflows/run-all-tests.yml b/.github/workflows/run-all-tests.yml index 5cb69f9d..2af6f5ec 100644 --- a/.github/workflows/run-all-tests.yml +++ b/.github/workflows/run-all-tests.yml @@ -29,7 +29,7 @@ jobs: - os: macos-11 arch: "macos-x86_64" # Always use the toolchain as UBSan produces linker errors with Apple LLVM 13. - bazel_args: "--config=toolchain" + bazel_args: "--config=toolchain --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-darwin" cache: "/private/var/tmp/bazel-disk" - os: windows-latest arch: "windows" diff --git a/docker/jazzer/Dockerfile b/docker/jazzer/Dockerfile index b82b9d83..56787be7 100644 --- a/docker/jazzer/Dockerfile +++ b/docker/jazzer/Dockerfile @@ -24,7 +24,8 @@ RUN git clone --depth=1 https://github.com/CodeIntelligenceTesting/jazzer.git && touch /usr/bin/ld && \ touch /usr/bin/ld.gold && \ BAZEL_DO_NOT_DETECT_CPP_TOOLCHAIN=1 \ - ./bazelisk-linux-amd64 build --config=toolchain //agent:jazzer_agent_deploy.jar //driver:jazzer_driver + ./bazelisk-linux-amd64 build --config=toolchain --extra_toolchains=@llvm_toolchain//:cc-toolchain-x86_64-linux \ + //agent:jazzer_agent_deploy.jar //driver:jazzer_driver FROM gcr.io/distroless/java |