| Issue |
171613
|
| Summary |
llvm.clear_cache is not supported on wasm
|
| Labels |
new issue
|
| Assignees |
|
| Reporter |
donthomasitos
|
I use the latest version of Emscripten to compile Luau. I get this error:
```
[build] /home/donthomasitos/Documents/Baduz/emsdk/upstream/emscripten/em++ -DCMAKE_INTDIR=\"Debug\" -I/home/donthomasitos/Documents/Baduz/src/extern/luau/CodeGen/include -I/home/donthomasitos/Documents/Baduz/src/extern/luau/VM/include -I/home/donthomasitos/Documents/Baduz/src/extern/luau/Common/include -I/home/donthomasitos/Documents/Baduz/src/extern/luau/VM/src -g -Wall -Wimplicit-fallthrough -Wsign-compare -Wno-unused-parameter -std=c++2b -MD -MT src/extern/luau/CMakeFiles/Luau.CodeGen.dir/Debug/CodeGen/src/CodeAllocator.cpp.o -MF src/extern/luau/CMakeFiles/Luau.CodeGen.dir/Debug/CodeGen/src/CodeAllocator.cpp.o.d -o src/extern/luau/CMakeFiles/Luau.CodeGen.dir/Debug/CodeGen/src/CodeAllocator.cpp.o -c /home/donthomasitos/Documents/Baduz/src/extern/luau/CodeGen/src/CodeAllocator.cpp
[build] fatal error: error in backend: llvm.clear_cache is not supported on wasm
[build] PLEASE submit a bug report to https://github.com/llvm/llvm-project/issues/ and include the crash backtrace, preprocessed source, and associated run script.
[build] Stack dump:
[build] 0. Program arguments: /home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang++ -target wasm32-unknown-emscripten -fignore-exceptions -mllvm -combiner-global-alias-analysis=false -mllvm -enable-emscripten-sjlj -mllvm -disable-lsr --sysroot=/home/donthomasitos/Documents/Baduz/emsdk/upstream/emscripten/cache/sysroot -DEMSCRIPTEN -Xclang -iwithsysroot/include/fakesdl -Xclang -iwithsysroot/include/compat -DCMAKE_INTDIR=\"Debug\" -I/home/donthomasitos/Documents/Baduz/src/extern/luau/CodeGen/include -I/home/donthomasitos/Documents/Baduz/src/extern/luau/VM/include -I/home/donthomasitos/Documents/Baduz/src/extern/luau/Common/include -I/home/donthomasitos/Documents/Baduz/src/extern/luau/VM/src -g -Wall -Wimplicit-fallthrough -Wsign-compare -Wno-unused-parameter -std=c++2b -MD -MT src/extern/luau/CMakeFiles/Luau.CodeGen.dir/Debug/CodeGen/src/CodeAllocator.cpp.o -MF src/extern/luau/CMakeFiles/Luau.CodeGen.dir/Debug/CodeGen/src/CodeAllocator.cpp.o.d -osrc/extern/luau/CMakeFiles/Luau.CodeGen.dir/Debug/CodeGen/src/CodeAllocator.cpp.o -c /home/donthomasitos/Documents/Baduz/src/extern/luau/CodeGen/src/CodeAllocator.cpp
[build] 1. <eof> parser at end of file
[build] 2. Code generation
[build] 3. Running pass 'Function Pass Manager' on module '/home/donthomasitos/Documents/Baduz/src/extern/luau/CodeGen/src/CodeAllocator.cpp'.
[build] 4. Running pass 'WebAssembly Instruction Selection' on function '@_ZL21flushInstructionCachePhm'
[build] #0 0x000058b276b6b5c8 llvm::sys::PrintStackTrace(llvm::raw_ostream&, int) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x31835c8)
[build] #1 0x000058b276b682b5 llvm::sys::RunSignalHandlers() (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x31802b5)
[build] #2 0x000058b276b6a82f llvm::sys::CleanupOnSignal(unsigned long) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x318282f)
[build] #3 0x000058b276ac8ade (anonymous namespace)::CrashRecoveryContextImpl::HandleCrash(int, unsigned long) (.llvm.3129919842383102481) CrashRecoveryContext.cpp:0:0
[build] #4 0x000058b276ac8a9b (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x30e0a9b)
[build] #5 0x000058b276b64e5b (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x317ce5b)
[build] #6 0x000058b275715f01 (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x1d2df01)
[build] #7 0x000058b276acf8c8 llvm::report_fatal_error(llvm::Twine const&, bool) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x30e78c8)
[build] #8 0x000058b276acf786 (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x30e7786)
[build] #9 0x000058b27573d677 llvm::WebAssemblyTargetLowering::LowerOperation(llvm::SDValue, llvm::SelectionDAG&) const WebAssemblyISelLowering.cpp:0:0
[build] #10 0x000058b27877dcff (anonymous namespace)::SelectionDAGLegalize::LegalizeOp(llvm::SDNode*) (.llvm.15156338795425384051) LegalizeDAG.cpp:0:0
[build] #11 0x000058b27877d1fd llvm::SelectionDAG::Legalize() (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x4d951fd)
[build] #12 0x000058b2788723a6 llvm::SelectionDAGISel::CodeGenAndEmitDAG() (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x4e8a3a6)
[build] #13 0x000058b278871119 llvm::SelectionDAGISel::SelectAllBasicBlocks(llvm::Function const&) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x4e89119)
[build] #14 0x000058b27886e37f llvm::SelectionDAGISel::runOnMachineFunction(llvm::MachineFunction&) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x4e8637f)
[build] #15 0x000058b27886bbc4 llvm::SelectionDAGISelLegacy::runOnMachineFunction(llvm::MachineFunction&) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x4e83bc4)
[build] #16 0x000058b276005e33 llvm::MachineFunctionPass::runOnFunction(llvm::Function&) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x261de33)
[build] #17 0x000058b2765c8b87 llvm::FPPassManager::runOnFunction(llvm::Function&) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x2be0b87)
[build] #18 0x000058b2765d0d2c llvm::FPPassManager::runOnModule(llvm::Module&) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x2be8d2c)
[build] #19 0x000058b2765c9a58 llvm::legacy::PassManagerImpl::run(llvm::Module&) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x2be1a58)
[build] #20 0x000058b27739be67 clang::emitBackendOutput(clang::CompilerInstance&, clang::CodeGenOptions&, llvm::StringRef, llvm::Module*, clang::BackendAction, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>, std::__2::unique_ptr<llvm::raw_pwrite_stream, std::__2::default_delete<llvm::raw_pwrite_stream>>, clang::BackendConsumer*) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x39b3e67)
[build] #21 0x000058b2773b050a clang::BackendConsumer::HandleTranslationUnit(clang::ASTContext&) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x39c850a)
[build] #22 0x000058b278bd1eb9 clang::ParseAST(clang::Sema&, bool, bool) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x51e9eb9)
[build] #23 0x000058b2779c7d3d clang::FrontendAction::Execute() (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x3fdfd3d)
[build] #24 0x000058b2778af560 clang::CompilerInstance::ExecuteAction(clang::FrontendAction&) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x3ec7560)
[build] #25 0x000058b277adbff0 clang::ExecuteCompilerInvocation(clang::CompilerInstance*) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x40f3ff0)
[build] #26 0x000058b275714c54 cc1_main(llvm::ArrayRef<char const*>, char const*, void*) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x1d2cc54)
[build] #27 0x000058b2757115a3 ExecuteCC1Tool(llvm::SmallVectorImpl<char const*>&, llvm::ToolContext const&, llvm::IntrusiveRefCntPtr<llvm::vfs::FileSystem>) driver.cpp:0:0
[build] #28 0x000058b2757131c2 int llvm::function_ref<int (llvm::SmallVectorImpl<char const*>&)>::callback_fn<clang_main(int, char**, llvm::ToolContext const&)::$_0>(long, llvm::SmallVectorImpl<char const*>&) driver.cpp:0:0
[build] #29 0x000058b2776f6399 void llvm::function_ref<void ()>::callback_fn<clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__2::optional<llvm::StringRef>>, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char>>*, bool*) const::$_0>(long) Job.cpp:0:0
[build] #30 0x000058b276ac8a78 llvm::CrashRecoveryContext::RunSafely(llvm::function_ref<void ()>) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x30e0a78)
[build] #31 0x000058b2776f5ad4 clang::driver::CC1Command::Execute(llvm::ArrayRef<std::__2::optional<llvm::StringRef>>, std::__2::basic_string<char, std::__2::char_traits<char>, std::__2::allocator<char>>*, bool*) const (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x3d0dad4)
[build] #32 0x000058b2776ac4b7 clang::driver::Compilation::ExecuteCommand(clang::driver::Command const&, clang::driver::Command const*&, bool) const (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x3cc44b7)
[build] #33 0x000058b2776ac6be clang::driver::Compilation::ExecuteJobs(clang::driver::JobList const&, llvm::SmallVectorImpl<std::__2::pair<int, clang::driver::Command const*>>&, bool) const (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x3cc46be)
[build] #34 0x000058b2776ccf2c clang::driver::Driver::ExecuteCompilation(clang::driver::Compilation&, llvm::SmallVectorImpl<std::__2::pair<int, clang::driver::Command const*>>&) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x3ce4f2c)
[build] #35 0x000058b2757105ce clang_main(int, char**, llvm::ToolContext const&) (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x1d285ce)
[build] #36 0x000058b27572111a main (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x1d3911a)
[build] #37 0x000070a32b829d90 __libc_start_call_main ./csu/../sysdeps/nptl/libc_start_call_main.h:58:16
[build] #38 0x000070a32b829e40 call_init ./csu/../csu/libc-start.c:128:20
[build] #39 0x000070a32b829e40 __libc_start_main ./csu/../csu/libc-start.c:379:5
[build] #40 0x000058b275676a2a _start (/home/donthomasitos/Documents/Baduz/emsdk/upstream/bin/clang+++0x1c8ea2a)
[build] clang++: error: clang frontend command failed with exit code 70 (use -v to see invocation)
[build] clang version 22.0.0git (https:/github.com/llvm/llvm-project 60513b8d6ebacde46e8fbe4faf1319ac87e990e3)
[build] Target: wasm32-unknown-emscripten
[build] Thread model: posix
[build] InstalledDir: /home/donthomasitos/Documents/Baduz/emsdk/upstream/bin
[build] clang++: note: diagnostic msg:
[build] ********************
[build]
[build] PLEASE ATTACH THE FOLLOWING FILES TO THE BUG REPORT:
[build] Preprocessed source(s) and associated run script(s) are located at:
[build] clang++: note: diagnostic msg: /tmp/CodeAllocator-92f0ee.cpp
[build] clang++: note: diagnostic msg: /tmp/CodeAllocator-92f0ee.sh
[build] clang++: note: diagnostic msg:
[build]
[build] ********************
```
Is this a bug? Any advice on how to circumvent this would be appreciated.
[CodeAllocator-92f0ee.cpp](https://github.com/user-attachments/files/24078607/CodeAllocator-92f0ee.cpp)
[CodeAllocator-92f0ee.sh](https://github.com/user-attachments/files/24078608/CodeAllocator-92f0ee.sh)
_______________________________________________
llvm-bugs mailing list
[email protected]
https://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-bugs