Commit 1b534e9
committed
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/3993330711 parent b11adab commit 1b534e9
File tree
7 files changed
+37
-26
lines changed- compiler-rt/lib
- asan
- sanitizer_common
- lld
- llvm
- cmake/modules
- lib
- ExecutionEngine/RuntimeDyld
- Support/Unix
7 files changed
+37
-26
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
214 | 214 | | |
215 | 215 | | |
216 | 216 | | |
217 | | - | |
| 217 | + | |
218 | 218 | | |
219 | 219 | | |
220 | 220 | | |
| |||
Lines changed: 1 addition & 5 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
698 | 698 | | |
699 | 699 | | |
700 | 700 | | |
701 | | - | |
702 | | - | |
703 | 701 | | |
704 | | - | |
705 | | - | |
706 | | - | |
| 702 | + | |
707 | 703 | | |
708 | 704 | | |
709 | 705 | | |
| |||
Lines changed: 4 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
106 | 106 | | |
107 | 107 | | |
108 | 108 | | |
| 109 | + | |
109 | 110 | | |
110 | 111 | | |
111 | 112 | | |
| |||
1010 | 1011 | | |
1011 | 1012 | | |
1012 | 1013 | | |
1013 | | - | |
1014 | | - | |
1015 | | - | |
| 1014 | + | |
| 1015 | + | |
| 1016 | + | |
1016 | 1017 | | |
1017 | 1018 | | |
1018 | 1019 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
210 | 210 | | |
211 | 211 | | |
212 | 212 | | |
| 213 | + | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
| 218 | + | |
| 219 | + | |
| 220 | + | |
| 221 | + | |
| 222 | + | |
| 223 | + | |
| 224 | + | |
| 225 | + | |
213 | 226 | | |
214 | 227 | | |
215 | 228 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
62 | 62 | | |
63 | 63 | | |
64 | 64 | | |
65 | | - | |
66 | | - | |
67 | | - | |
68 | | - | |
69 | | - | |
70 | | - | |
71 | | - | |
72 | | - | |
73 | | - | |
74 | | - | |
75 | | - | |
76 | | - | |
77 | | - | |
| 65 | + | |
| 66 | + | |
| 67 | + | |
| 68 | + | |
| 69 | + | |
| 70 | + | |
| 71 | + | |
| 72 | + | |
| 73 | + | |
| 74 | + | |
| 75 | + | |
| 76 | + | |
| 77 | + | |
| 78 | + | |
78 | 79 | | |
79 | 80 | | |
80 | 81 | | |
| |||
Lines changed: 3 additions & 3 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
243 | 243 | | |
244 | 244 | | |
245 | 245 | | |
246 | | - | |
247 | | - | |
248 | | - | |
| 246 | + | |
| 247 | + | |
| 248 | + | |
249 | 249 | | |
250 | 250 | | |
251 | 251 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
462 | 462 | | |
463 | 463 | | |
464 | 464 | | |
465 | | - | |
| 465 | + | |
466 | 466 | | |
467 | 467 | | |
468 | 468 | | |
| |||
0 commit comments