Commit 4bba12f
committed
[lli] Make sure the exported __chkstk functions are included when exporting them
The trick we use (since cbc2a06)
for exporting the __chkstk function (with various per-arch names)
that is defined in a different object file, relies on the function
already being linked in (by some function referencing it).
This function does end up referenced if there's a function that
allocates more than 4 KB on the stack. In most cases, it's referenced
somewhere, but in the case of builds with LLVM_LINK_LLVM_DYLIB
enabled (so most of the code resides in a separate libLLVM-<ver>.dll)
the only code in lli.exe is the lli tool specific code and the
mingw-w64 crt startup code. In the case of GCC based MinGW i386
builds with LLVM_LINK_LLVM_DYLIB, nothing else references it though.
Manually add a reference to the function to make sure it is linked
in (from libgcc or compiler-rt builtins) so that it can be exported.
This fixes one build issue encountered in
msys2/MINGW-packages#18002.
Differential Revision: https://reviews.llvm.org/D1590851 parent e5137e7 commit 4bba12f
1 file changed
+14
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1206 | 1206 | | |
1207 | 1207 | | |
1208 | 1208 | | |
| 1209 | + | |
| 1210 | + | |
| 1211 | + | |
| 1212 | + | |
| 1213 | + | |
| 1214 | + | |
| 1215 | + | |
1209 | 1216 | | |
1210 | 1217 | | |
1211 | 1218 | | |
1212 | 1219 | | |
1213 | 1220 | | |
1214 | 1221 | | |
| 1222 | + | |
| 1223 | + | |
| 1224 | + | |
1215 | 1225 | | |
1216 | 1226 | | |
1217 | 1227 | | |
| 1228 | + | |
| 1229 | + | |
1218 | 1230 | | |
1219 | 1231 | | |
1220 | 1232 | | |
| 1233 | + | |
| 1234 | + | |
1221 | 1235 | | |
1222 | 1236 | | |
1223 | 1237 | | |
| |||
0 commit comments