forked from rust-lang/llvm-project
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Assortment of Rust-related build fixes
This commit is an assortment of build fixes for LLVM that we've applied for rust-lang/rust. These are unlikely to ever go upstream, but if we could upstream them somehow that'd definitely be great! In any case for now some rationale for these patches are: * We build on ancient CentOS containers for i686/x86_64 Linux releases. The libc header files there are insanely old and despite using a recent gcc/clang release the libc headers cause issues. Some various pieces are commented out or altered to pieces of LLVM that aren't exercised or used much by LLVM. * Sometimes there's some miscellaneous MSVC things here and there, but nothing crticial. For details of changes to specific files: ----------------------------------------------------------------------- * llvm/lib/ExecutionEngine/RuntimeDyld/RTDyldMemoryManager.cpp Fix compile on dist-i686-linux builder If this lines are present then we apparently get errors [1] when compiling in the current [2] dist-i686-linux container. Attempts to upgrade both gcc and binutils did not fix the error, so it appears that this may just be a bug in the super old glibc we're using on the dist-i686-linux container. We don't actually need this code anyway, so just work around these issues by removing references to the `*64` functions. This'll get things compiling locally and shouldn't be a regression in functionality. [1]: https://travis-ci.org/rust-lang/rust/jobs/257578199 [2]: https://github.com/rust-lang/rust/tree/eba9d7f08ce5c90549ee52337aca0010ad566f0d/src/ci/docker/dist-i686-linux ----------------------------------------------------------------------- * llvm/cmake/modules/CheckAtomic.cmake Disable checks for libatomic for now For whatever reason this is failing the i686-freebsd builder in the Rust repo as-of this red-hot moment. The build seems to work fine without it so let's just remove it for now and pray there's a better fix later. Although if you're reading this and know of a better fix, we'd love to remove this! ----------------------------------------------------------------------- * lld/CMakeLists.txt Compile with /MT on MSVC Can't seem to figure out how to do this without this patch... ----------------------------------------------------------------------- * compiler-rt/lib/asan/asan_linux.c * compiler-rt/lib/sanitizer_common/sanitizer_linux_libcdep.cc * llvm/lib/Support/Unix/Program.inc Fix compile on dist-x86_64-linux builder for LLVM/sanitizers Apparently glibc is so old it doesn't have the _POSIX_ARG_MAX constant. This shouldn't affect anything we use anyway though. Apply similar treatment to various definitions of things compiler-rt. https://travis-ci.org/rust-lang/rust/jobs/399333071
- Loading branch information
1 parent
b11adab
commit 1b534e9
Showing
7 changed files
with
37 additions
and
26 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters