Issue |
52800
|
Summary |
wasm-ld: Can't create a MachineFunction using a Module with a " "Target-incompatible DataLayout attached
|
Labels |
new issue
|
Assignees |
|
Reporter |
yowl
|
I don't know this is a real bug or just my input, but I'm stuck and the message says file a bug so here I am.
With wasm-ld version
```
E:\GitHub\w4>E:/GitHub/emsdk/upstream/bin\wasm-ld.exe --version
LLD 14.0.0
```
The one that comes with emscripten tot,
```
emcc (Emscripten gcc/clang-like replacement + linker emulating GNU ld) 3.0.2-git (e4163cc2a5ea43a103dc8eda3c1b8620ec0d991e)
```
And with the command line
```
E:/GitHub/emsdk/upstream/bin\wasm-ld.exe -o hello-wasm.wasm hello.bc -mllvm -combiner-global-alias-analysis=false -mllvm -disable-lsr --import-undefined --strip-debug --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=fflush --export=emscripten_stack_get_end --export=emscripten_stack_get_free --export=emscripten_stack_init --export=stackSave --export=stackRestore --export=stackAlloc --export=__wasm_call_ctors --export=__errno_location --export-table -z stack-size=5242880 --initial-memory=16777216 --max-memory=16777216 --global-base=1024 --export=update --no-entry
```
And the attached bitcode (extract from attached zip)
[hello.zip](https://github.com/llvm/llvm-project/files/7740919/hello.zip)
)
I get the message
```
E:\GitHub\w4>E:/GitHub/emsdk/upstream/bin\wasm-ld.exe -o hello-wasm.wasm hello.bc -mllvm -combiner-global-alias-analysis=false -mllvm -disable-lsr --import-undefined --strip-debug --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=fflush --export=emscripten_stack_get_end --export=emscripten_stack_get_free --export=emscripten_stack_init --export=stackSave --export=stackRestore --export=stackAlloc --export=__wasm_call_ctors --export=__errno_location --export-table -z stack-size=5242880 --initial-memory=16777216 --max-memory=16777216 --global-base=1024 --export=update --no-entry
Assertion failed: Target.isCompatibleDataLayout(getDataLayout()) && "Can't create a MachineFunction using a Module with a " "Target-incompatible DataLayout attached\n", file C:\b\s\w\ir\cache\builder\emscripten-releases\llvm-project\llvm\lib\CodeGen\MachineFunction.cpp, line 207
PLEASE submit a bug report to https://bugs.llvm.org/ and include the crash backtrace.
Stack dump:
0. Program arguments: E:/GitHub/emsdk/upstream/bin\\wasm-ld.exe -o hello-wasm.wasm hello.bc -mllvm -combiner-global-alias-analysis=false -mllvm -disable-lsr --import-undefined --strip-debug --export-if-defined=__start_em_asm --export-if-defined=__stop_em_asm --export-if-defined=fflush --export=emscripten_stack_get_end --export=emscripten_stack_get_free --export=emscripten_stack_init --export=stackSave --export=stackRestore --export=stackAlloc --export=__wasm_call_ctors --export=__errno_location --export-table -z stack-size=5242880 --initial-memory=16777216 --max-memory=16777216 --global-base=1024 --export=update --no-entry
1. Running pass 'Function Pass Manager' on module 'ld-temp.o'.
2. Running pass 'WebAssembly Instruction Selection' on function '@update'
#0 0x00007ff638ba3316 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0xd3316)
#1 0x00007ff63ad642bb (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x22942bb)
#2 0x00007ff63ad5a770 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x228a770)
#3 0x00007ff63ad5ac7c (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x228ac7c)
#4 0x00007ff63ad5abaa (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x228abaa)
#5 0x00007ff6390af57d (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x5df57d)
#6 0x00007ff6390af0f1 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x5df0f1)
#7 0x00007ff63928f7ce (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x7bf7ce)
#8 0x00007ff638fbbfb9 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x4ebfb9)
#9 0x00007ff639177027 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x6a7027)
#10 0x00007ff63917e54c (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x6ae54c)
#11 0x00007ff63917772a (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x6a772a)
#12 0x00007ff63937e5dd (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x8ae5dd)
#13 0x00007ff63937d565 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x8ad565)
#14 0x00007ff638c6d296 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x19d296)
#15 0x00007ff638c6c777 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x19c777)
#16 0x00007ff638ec4de2 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x3f4de2)
#17 0x00007ff638e91939 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x3c1939)
#18 0x00007ff638b9010a (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0xc010a)
#19 0x00007ff638b8ba25 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0xbba25)
#20 0x00007ff638ad1828 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x1828)
#21 0x00007ff638ad12d6 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x12d6)
#22 0x00007ff63ad4c1a0 (E:\GitHub\emsdk\upstream\bin\wasm-ld.exe+0x227c1a0)
#23 0x00007ffbd9777034 (C:\WINDOWS\System32\KERNEL32.DLL+0x17034)
#24 0x00007ffbd9962651 (C:\WINDOWS\SYSTEM32\ntdll.dll+0x52651)
```
If I remove the `--export=update` then it doesnt error ( it does complain about missing symbols as I have them in another `.bc` which isn't necessary to repro this error message).
_______________________________________________
llvm-bugs mailing list
llvm-bugs@lists.llvm.org
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs