-
-
Notifications
You must be signed in to change notification settings - Fork 12.5k
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
llvm: convert bitcode in static archives to object code #112154
Conversation
This changes only the content of the static libraries. Any dependents would need to be rebuilt for those changes to affect them, so I'm skipping dependent testing here. |
1af3bc3
to
d21daff
Compare
In Homebrew#106925, I enabled LTO for our LLVM build. This creates static archives that contain LLVM bitcode instead of object code. This makes the static archives more difficult to use, requiring workarounds such as https://github.com/Homebrew/homebrew-core/blob/c01f1794fc3decce04b71cae03966213fc7af34d/Formula/enzyme.rb#L30 and has caused problems for multiple downstream projects. We can fix this by converting the bitcode into object code, which is what Fedora does with their LLVM build. They also build their toolchain with LTO. Alternatively, we can disable LTO, but that foregoes significant speedups we get from enabling it. While we're here, let's add some test coverage for features that were recently enabled that we don't test. Fixes: ziglang/zig#12923 halide/Halide#7055 mesonbuild/meson#10879 Homebrew/discussions#3666
d21daff
to
6e8c5f7
Compare
@@ -432,6 +432,24 @@ def install | |||
|
|||
# Install Emacs modes | |||
elisp.install llvmpath.glob("utils/emacs/*.el") + share.glob("clang/*.el") | |||
|
|||
return if OS.linux? || !pgo_build |
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.
Probably nice to have a lto_enabled
variable that could be used throughout in case this ever changes. Can be a separate style PR however.
LGTM. I was thinking maybe revision bump but 15.0.2 is probably out next week anyway. |
🤖 A scheduled task has triggered a merge. |
Fixed in Homebrew/homebrew-core#112154. This reverts commit c20fb65.
This was fixed in Homebrew#112154.
This is no longer needed after Homebrew/homebrew-core#112154.
This is no longer needed after Homebrew/homebrew-core#112154.
* llvm 15.0.2 * llvm: improve `install` method - define an `lto_build` variable per feedback from #112154 - move the runtimes build from `stage2-profdata` to `stage2`. Building the runtimes is not useful with the `stage2-profdata` compiler, but doing it in `stage2` means that the runtimes will be built with our instrumented compiler.
This was fixed in Homebrew#112154.
This patch remove a Homebrew specific workaround that's not needed after: Homebrew/homebrew-core#112154
This patch remove a Homebrew specific workaround that's not needed after: Homebrew/homebrew-core#112154
This patch remove a Homebrew specific workaround that's not needed after: Homebrew/homebrew-core#112154
Fixes Homebrew/discussions#3734. This is essentially the same issue as Homebrew#112154, except that I'm not aware of a way to convert the bitcode for GCC. It's possible that there is no way to do this, given that GCC seems to consider its IR as an internal implementation detail.
Fixes Homebrew/discussions#3734. This is essentially the same issue as #112154, except that I'm not aware of a way to convert the bitcode for GCC. It's possible that there is no way to do this, given that GCC seems to consider its IR as an internal implementation detail. Closes #113036. Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com> Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
Fixed in Homebrew/homebrew-core#112154. This reverts commit c20fb65.
Fixed in Homebrew/homebrew-core#112154. This reverts commit c20fb65.
In #106925, I enabled LTO for our LLVM build. This creates static
archives that contain LLVM bitcode instead of object code. This makes
the static archives more difficult to use, requiring workarounds such as
homebrew-core/Formula/enzyme.rb
Line 30 in c01f179
and has caused problems for multiple downstream projects.
We can fix this by converting the bitcode into object code, which is
what Fedora does with their LLVM build. They also build their toolchain
with LTO.
Alternatively, we can disable LTO, but that foregoes significant
speedups we get from enabling it.
While we're here, let's add some test coverage for features that were
recently enabled that we don't test.
Fixes:
ziglang/zig#12923
halide/Halide#7055
mesonbuild/meson#10879
Homebrew/discussions#3666
brew install --build-from-source <formula>
, where<formula>
is the name of the formula you're submitting?brew test <formula>
, where<formula>
is the name of the formula you're submitting?brew audit --strict <formula>
(after doingbrew install --build-from-source <formula>
)? If this is a new formula, does it passbrew audit --new <formula>
?