-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Definitions for i686-unknown-linux-musl, arm and asmjs musl #122
New issue
Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? # to your account
Conversation
Looking at the build failures now. |
a2ccd82
to
6d132c4
Compare
Remaining failure looks bogus. |
pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; | ||
#[cfg(any(target_arch = "x86", | ||
target_arch = "arm", | ||
target_arch = "asmjs"))] |
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.
Could these #[cfg]
blocks be avoided by splitting this into a musl/$arch.rs
-style configuration like with Linux?
Yeah I think build failures are unrelated, I'm prepping a PR that should bring them all in line |
I've moved some of the definitions around as requested. |
__reserved: [::c_long; 3], | ||
} | ||
// This definition is slightly different on aarch64 | ||
#[cfg(not(target_arch = "aarch64"))] |
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.
Do we actually have aarch64 support?
Stylistically I also tend to prefer copying things around instead of using #[cfg]
and/or #[cfg(not)]
(even though it's a little wordier), but doesn't matter too much here, it can just be cleaned up later if it becomes a problem.
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.
No, but I noticed in passing these definitions are weird and just added these defensively. I can remove them.
Updated for most recent reviews. |
@@ -108,7 +111,8 @@ s! { | |||
pub dli_saddr: *mut ::c_void, | |||
} | |||
|
|||
#[cfg_attr(any(target_arch = "x86", target_arch = "x86_64"), | |||
#[cfg_attr(any(all(target_arch = "x86", not(target_env = "musl")), | |||
target_arch = "x86_64"), |
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.
This line should be lined up with the a
in all
, right?
I'm fine merging whenever (just minor nits), but CI doesn't like two of the constants for MUSL |
I've tested x86 against C locally, but not arm or asmjs. I added the arm definitions because asmjs's C is derived from arms. Mysteriously, my locally-built musl does not contain a definition for _SC_2_C_VERSION, so I just removed it.
Definitions for i686-unknown-linux-musl, arm and asmjs musl
📦 |
Here's another go at adding emscripten support. This needs to wait again on new [libc definitions](rust-lang/libc#122) landing. To get the libc definitions right I had to add support for i686-unknown-linux-musl, which are very similar to emscripten's, which are derived from arm/musl. This branch additionally removes the makefile dependency on the `EMSCRIPTEN` environment variable by not building the unused compiler-rt. Again, this is not sufficient for actually compiling to asmjs since it needs additional LLVM patches. r? @alexcrichton
* added _mm_cvtps_pd * added _mm_set_sd * added _mm_set1_pd * added _mm_set_pd1 * added _mm_set_pd * added _mm_setr_pd * added _mm_setzero_pd
I've tested x86 against C locally, but not arm or asmjs.
I added the arm definitions because asmjs's C is derived from arms.
Mysteriously, my locally-built musl does not contain a
definition for _SC_2_C_VERSION, so I just removed it.
Some of these conditions, particularly in notbsd, could be pushed further down the tree.