Skip to content

all: switch to LLVM 11 for static builds #1520

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

Merged
merged 1 commit into from
Dec 10, 2020
Merged

Conversation

aykevl
Copy link
Member

@aykevl aykevl commented Dec 3, 2020

This commit switches to LLVM 11 for builds with LLVM linked statically (e.g. make). It does not yet switch the default for builds dynamically linked to LLVM (like when you run go install), that should be done in a later change.

This commit also changes to use the default host toolchain (normally GCC) instead of Clang as the default compiler in CI. There were some issues with Clang 3.8 in CI and hopefully this will fix it.

This PR is now possible since the LLVM fork from Espressif was updated, see: espressif/llvm-project#40

Perhaps the most important improvement will be a number of changes to the AVR backend that make it much more usable. Another change is a bugfix in the Xtensa backend necessary for proper floating point functioning.

@aykevl aykevl force-pushed the llvm11-static-build branch 15 times, most recently from a6818b5 to 00d22d1 Compare December 3, 2020 14:24
@aykevl
Copy link
Member Author

aykevl commented Dec 3, 2020

Note: still working on this. Windows appears to need some extra work.

@aykevl aykevl force-pushed the llvm11-static-build branch 13 times, most recently from 9cdc397 to ca400d8 Compare December 7, 2020 19:11
@aykevl aykevl force-pushed the llvm11-static-build branch 10 times, most recently from 73c9a39 to 5592ee6 Compare December 8, 2020 13:37
@aykevl
Copy link
Member Author

aykevl commented Dec 8, 2020

Windows appears to need some extra work.

Let's just say that was an understatement. I still haven't figured it out.

@aykevl aykevl force-pushed the llvm11-static-build branch 2 times, most recently from ad1c53d to ecac6cc Compare December 9, 2020 22:42
This commit switches to LLVM 11 for builds with LLVM linked statically
(e.g. `make`). It does not yet switch the default for builds dynamically
linked to LLVM, that should be done in a later change.

This commit also changes to use the default host toolchain (probably
GCC) instead of Clang as the default compiler in CI. There were some
issues with Clang 3.8 in CI and hopefully this will fix it.

Additionally it updates the way LLVM is built on Windows, with
-DLLVM_ENABLE_PIC=OFF (which should have been used all along). This
change makes it possible to revert a hack to build libclang manually and
instead uses the libclang static library like on all other operating
systems, simplifying the Makefile.
@aykevl aykevl force-pushed the llvm11-static-build branch from ecac6cc to fb09ac2 Compare December 9, 2020 23:43
@aykevl
Copy link
Member Author

aykevl commented Dec 10, 2020

Finally, this is ready for review/merge. The secret code was -DLLVM_ENABLE_PIC=OFF, using this in fact makes the Makefile a bit simpler (no hack to manually create libclang.a).

@aykevl aykevl mentioned this pull request Dec 10, 2020
@deadprogram
Copy link
Member

That was some pretty amazingly hard effort to figure that out, good one @aykevl now merging.

@deadprogram deadprogram merged commit bb27bbc into dev Dec 10, 2020
@deadprogram deadprogram deleted the llvm11-static-build branch December 10, 2020 06:01
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 this pull request may close these issues.

2 participants