Skip to content
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

Add musl targets to CI. #935

Closed
wants to merge 1 commit into from
Closed

Add musl targets to CI. #935

wants to merge 1 commit into from

Conversation

cbiffle
Copy link

@cbiffle cbiffle commented Jan 11, 2020

I've added musl-gcc here, and not musl-clang, because I can't figure out
what the package name for musl-clang is on Ubuntu.

I agree to license my contributions to each file under the terms given
at the top of each file I changed.

I've added musl-gcc here, and not musl-clang, because I can't figure out
what the package name for musl-clang is on Ubuntu.

I agree to license my contributions to each file under the terms given
at the top of each file I changed.
@briansmith
Copy link
Owner

@cbiffle Your PR is still marked as a draft. Is it ready to be reviewed?

@briansmith
Copy link
Owner

OK, I looked at this and it seems OK for now. However, I would really appreciate it if somebody could get it working with clang as the toolchain instead of musl-gcc. At least the last time I tried it, GCC didn't do a good job optimizing some of the multi-precision arithmetic. My understanding is that to build with clang, we "just" need to use TARGET_CC=clang

$ sudo apt remove musl musl-dev musl-tools
$ sudo apt install musl-dev
$ TARGET_CC=clang cargo test --target=x86_64-unknown-linux-musl

Actually, for me it worked even without the sudo apt install musl-dev step.

@briansmith
Copy link
Owner

I've added musl-gcc here, and not musl-clang, because I can't figure out
what the package name for musl-clang is on Ubuntu.

My understanding is there is no "musl-clang". Instead, clang always works as a cross compiler, so installing any(?) version of clang will install one that can target musl. Even this ancient one was able to do it, as this is the version I used in my previous comment:

$ clang --version
clang version 6.0.0-1ubuntu2 (tags/RELEASE_600/final)
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin

@briansmith
Copy link
Owner

Given the aforementioned comments and also the fact that I'm trying to remove the master branch today, I'm closing this MR. I would love to see a new, simpler, version of this that uses clang instead of GCC.

@briansmith briansmith closed this Jun 19, 2020
@briansmith
Copy link
Owner

Also, @cbiffle, thanks for your work on this!

@aig787 aig787 mentioned this pull request Oct 27, 2020
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.

Add support for statically-linked musl libc Linux targets (-unknown-linux-musl)
2 participants