-
Notifications
You must be signed in to change notification settings - Fork 671
[bazel] Build with LLVM #8414
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
base: 2027
Are you sure you want to change the base?
[bazel] Build with LLVM #8414
Conversation
we should probs pull in x11 from bcr? tbh probably imgui/glfw from bcr too
| # TODO(davo): update version after the next release of toolchains_llvm after 1.5.0 | ||
| http_archive( | ||
| name = "toolchains_llvm", | ||
| integrity = "sha256-Ht0UsdgsySFX+H7AU3TS992uZr8nV5TP60lADgKeP7s=", | ||
| strip_prefix = "toolchains_llvm-cebf1ed19db1521bcaae489a40dd736d50e9302f", | ||
| url = "https://github.com/bazel-contrib/toolchains_llvm/archive/cebf1ed19db1521bcaae489a40dd736d50e9302f.tar.gz", | ||
| ) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There's no toolchains_llvm release that supports the extra_*_flags parameters yet.
Rebuilding the world requires more disk space.
|
libtinfo5 is a library you can install (or patch into the llvm install) on 22.04. |
b3c4bdd to
3ab7b31
Compare
| "darwin-aarch64": CONLY_FLAGS, | ||
| "darwin-x86_64": CONLY_FLAGS, | ||
| "linux-aarch64": CONLY_FLAGS, | ||
| "linux-x86_64": CONLY_FLAGS, |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@AustinSchuh was there a particular reason bazel-contrib/toolchains_llvm#435 doesn't allow specifying a global conly_flags default with the empty string key like the other params?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No reason other than it probably didn't exist when that code was originally written 6 years ago.
|
Bazel bits look good. In general, I'm a big clang fan, but I can't judge if that is good for this project or not. |
This pulls a hermetic LLVM toolchain into the Bazel workspace, for use in our Linux x86-64 builds. This removes our dependency on the host OS C++ toolchain, and hence makes building in a container largely redundant.
Since we no longer build in a container, this also frees up some disk space for our CI builds, however this is somewhat displaced by the size of the toolchain download.
Note that this doesn't register the toolchain with an isolated sysroot, so this now relies on the host image for its sysroot.