This is an archive of the discontinued LLVM Phabricator instance.

llvm: fix building with musl libc
AbandonedPublic

Authored by martell on Jul 3 2017, 7:12 AM.

Details

Reviewers
krytarowski
pcc
Summary

musl uses #define to map some 64 type functions for backwards compatibility.
this breaks building LLVM which assumes GLIBC in a lot of places.

There is no MUSL macro so this is the best way to detect it currently.
One would presume the #undef's should be safe without a guard.
This is just a precaution. Suggested improvements welcome :)

Diff Detail

Repository
rL LLVM

Event Timeline

martell created this revision.Jul 3 2017, 7:12 AM
krytarowski edited edge metadata.Jul 3 2017, 7:52 AM

What are the exact build failures? This patch looks wrong.

I thought we fixed this in r292848; is this still an issue on trunk?

martell abandoned this revision.Jul 3 2017, 1:55 PM

What are the exact build failures? This patch looks wrong.

Hmm, after updating to HEAD it seems to pass, this was an issue for the 4.0 release but has since been fixed.
Going to abandon this.
Sorry for the noise.

@efriedma thanks for clarifying where it was fixed