Skip to content

Add musl targets to CI. - #935

Closed
cbiffle wants to merge 1 commit into
briansmith:masterfrom
cbiffle:musl
Closed

Add musl targets to CI.#935
cbiffle wants to merge 1 commit into
briansmith:masterfrom
cbiffle:musl

Conversation

@cbiffle

@cbiffle cbiffle commented Jan 11, 2020

Copy link
Copy Markdown

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
Copy Markdown
Owner

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

@briansmith

Copy link
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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
Copy Markdown
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