Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support hermetic clang toolchain #1

Closed
rockwotj opened this issue Apr 30, 2022 · 4 comments · Fixed by #2
Closed

Support hermetic clang toolchain #1

rockwotj opened this issue Apr 30, 2022 · 4 comments · Fixed by #2

Comments

@rockwotj
Copy link

It would be great if this template only required bazel and bazel could manage the clang installation. I think it could be simple to setup something like https://github.com/grailbio/bazel-toolchain to support a built-in clang toolchain

@jwmcglynn
Copy link
Owner

Oh yeah, good idea. I did this on one of my private repos, however at the time grailbio/bazel-toolchain didn't support Apple Silicon, so it still relied on the built-in toolchain on macOS.

Let me see if I can port this over from my other repo.

@rockwotj
Copy link
Author

Ah it seems the M1 bug is still present: bazel-contrib/toolchains_llvm#88

jwmcglynn added a commit that referenced this issue Apr 30, 2022
Instead of using the `llvm.sh` install script, use grailbio/bazel-toolchain which will automatically download the toolchain and use it.

However, this only works on Linux, not Apple Silicon due to a bug (See #1), so on macOS, disable this behavior and use the system toolchain.
jwmcglynn added a commit that referenced this issue Apr 30, 2022
Instead of using the `llvm.sh` install script, use grailbio/bazel-toolchain which will automatically download the toolchain and use it.

However, this only works on Linux, not Apple Silicon due to a bug (See #1), so on macOS, disable this behavior and use the system toolchain.
jwmcglynn added a commit that referenced this issue Apr 30, 2022
Instead of using the `llvm.sh` install script, use grailbio/bazel-toolchain which will automatically download the toolchain and use it.

However, this only works on Linux, not Apple Silicon due to a bug (See #1), so on macOS, disable this behavior and use the system toolchain.
@jwmcglynn
Copy link
Owner

https://github.com/jwmcglynn/bazel-cpp20/tree/bazel-toolchain is making progress, and builds in the devcontainer and on macOS, but it still needs some debugging for CI.

jwmcglynn added a commit that referenced this issue May 1, 2022
Instead of using the `llvm.sh` install script, use grailbio/bazel-toolchain which will automatically download the toolchain and use it.

However, this only works on Linux, not Apple Silicon due to a bug (See #1), so on macOS, disable this behavior and use the system toolchain.
@rockwotj
Copy link
Author

rockwotj commented May 7, 2022

Whoot! Thanks for this speedy update :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants