-
Notifications
You must be signed in to change notification settings - Fork 10.5k
Build LLVM with RISCV support #61891
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
Conversation
@buttaface Could you review? RISCV is not built by default the way its invoked by the current build presets. |
When configuring
And without the patches
|
Output of
|
You're right, running that command with the latest official Swift trunk snapshot build for linux shows this arch missing. Let me look into why first. |
Ah, found it, the Swift default overrides LLVM's defaults with its own default list. You should add RISCV to the default there, rather than trying to override a couple presets here and there. |
@buttaface Thanks, I'll update the patch accordingly. |
3ce8281
to
cef854d
Compare
@buttaface I updated the PR with the requested changes |
cef854d
to
92ef2fa
Compare
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.
@gottesmm, would you approve and run the CI?
@CodaFi, mind reviewing? |
@MaxDesiatov Could you review please? |
A few things:
|
@gottesmm With regard to your first point, we are not building all LLVM targets, if you remove
in which case we are only adding 1 new target arch. My first commit (which was rebased) did the approach you suggest, but I changed it so we use the default value instead, so in the future its a single list (besides WASM usage) we need to modify. |
Ok. I am fine with using the default value. That being said, can you measure how much build time this adds to a clean build? |
@swift-ci please test |
@colemancda, a test is failing because you missed updating this line too. |
@colemancda, just waiting on you to update the test and check the difference in build time, and we can try to get this in. |
Builds LLVM and Clang with RISCV target enabled, which is not the default. Without this patch I get the following error when trying to compile:
Resolves SR-16005.