How to use --preload-file when compiling LLVM with emscripten? #17579
Unanswered
AlistairKeiller
asked this question in
Q&A
Replies: 1 comment 5 replies
-
How are you setting your I would recommend avoiding spaces in your link flags. Prefer I would recommend |
Beta Was this translation helpful? Give feedback.
5 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I am working on a browser-based c++ IDE/editor. To achieve this, I need to run a c++ compiler in the browser.
I have gotten LLVM compiled to webassembly with emscripten. Now I need to provide LLVM with libc++. It seems like the cleanest way to achieve this is to preload https://github.com/WebAssembly/wasi-sdk/releases/download/wasi-sdk-16/wasi-sysroot-16.0.tar.gz in the MEMFS using emscripten's
--preload-file wsysroot
flag.However, adding this flag to the LDFLAGS environment variable during the CMake step causes the error
CMake Error at cmake/modules/CheckCompilerVersion.cmake:98 (message): libstdc++ version must be at least 5.1
( https://github.com/AlistairKeiller/editor-wasm/tree/66b2a22e4865e6791252ff4923c78b7f24b101c8 ). This is the same error that occurs when I used the flags ALLOW_MEMORY_GROWTH
instead of-s ALLOW_MEMORY_GROWTH
, so it seems to be caused by invalid flags.I also tried installing libcxx and enabling the libcxx build target in CMake, which just gave the same error ( https://github.com/AlistairKeiller/editor-wasm/tree/3874fd76b3c3f77e50916aaca91eafe37ca25166 ).
Any suggestions on how to preload this file into the LLVM's MEMFS?
Beta Was this translation helpful? Give feedback.
All reactions