-
-
Notifications
You must be signed in to change notification settings - Fork 12.4k
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: general cleanup and corrections #52352
Conversation
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.
Should this also be applied to older versions?
Formula/llvm.rb
Outdated
# Use system libcxxabi. | ||
rm_r "libcxxabi" if build.head? | ||
|
||
py_ver = "2.7" |
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.
3 isn't an option?
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.
I think it is - Linuxbrew uses it. I limited making any actual functional changes (besides fixing polly linking) but I can go ahead and migrate to 3.8 unless there is a particular reason anyone knows not to.
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.
If we can use python 3.8, I would prefer that too. Just had no time to migrate it until now.
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.
Apart from Python, is there anything else here you would prefer done here that would be useful for Linux?
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.
@iMichka I linked the monster patch for linux in a slack PM to Bo
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.
I think I'll need to better understand the original problem and why it is Linux specific.
Looking at the patch alone, it doesn't seem obvious at first if there's a better way. You can do things like supplying sysroots but I think that is not what is wanted.
Perhaps in part - I need to be careful. |
Actually this doesn't need |
Sounds good |
No features have been removed or otherwise lost with these changes.
(lib/"python#{py_ver}/site-packages").install llvmpath/"bindings/python/llvm" | ||
|
||
# Install Emacs modes | ||
elisp.install Dir[llvmpath/"utils/emacs/*.el"] + Dir[share/"clang/*.el"] |
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.
You're sure this preserves all of the previously-included elisp files?
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.
Yes, I downloaded the bottle from Jenkins to verify:
$ ls ./llvm/10.0.0/share/emacs/site-lisp/llvm
clang-format.el clang-rename.el llvm-mode.el
clang-include-fixer.el emacs.el tablegen-mode.el
I'm still running into polly linking issues using the formula in this PR. I'm trying to build zig from source:
Mangled symbols for getPollyPluginInfo show up in libclang-cpp.dylib and LLVMPolly.so:
|
I thought the issue you describe was specific to standalone clang builds. The third commit of this pull request changes the type of build LLVM performs to avoid standalone builds entirely. If it doesn’t work on these two quite different setups, I don’t really know what can be done without upstream fixing it on their side. |
If someone can link to me a specific LLVM bug or patch about the issue that is not specific to Clang standalone then let me know. It seems to me that it's not a misconfiguration on Homebrew's side given apt.llvm.org has the same issue and there is a current open bug at Debian about it. |
At least, this PR totally solved LLVM 10 installation for me. |
I see a lot of discussion pointing here from various issues so I'll summarise what's been done:
As for I do suspect however that you can avoid the issue altogether by stopping linking against Clang's static libraries and start linking against the shared library As some general guidance: LLVM does provide some CMake targets for you in the CMake files they ship at |
Thanks for fixing - llvm installs cleanly for me now. |
@Bo98 that commit 78baeec only does a small subset of the changes in this PR, what about the other changes? according to ziglang/zig#4897 (comment)
|
@timotheecour See discussion on ziglang/zig#4799. I'm aware of some issues on zig 0.6.0 but they don't appear to be the same issues as the one you linked. |
@Bo98 i followed that thread but the "fix" suggested
|
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 <formula>
)?Some of this could likely be applied to llvm@9 and earlier. The formula was a collection of a years of additions - some of which no longer applies.
I will want to verify the bottle's contents before merging this.Done.