DerThorsten / clang_wasm_experiments

clang_wasm_experiments
0 stars 0 forks source link

LIBCLANG FATAL ERROR: could not locate Clang resource path #1

Open DerThorsten opened 3 months ago

DerThorsten commented 3 months ago

I assume we need to mount / copy a lot of files into the emscripten virtual filesystem

DerThorsten commented 3 months ago

ping @serge-sans-paille

DerThorsten commented 3 months ago

I now copy from $PREFIX/lib/clang/17 to the virtual filesystem. Yet it still complains about the clang resource path. I believe I used the correct path, I can ask clang.js for the resources path:

> node clang.js -print-resource-dir
lib/clang/17

and all the headers are loaded at this path :/

serge-sans-paille commented 3 months ago

Plus all the libc headers that live in the system... not to speak about libstdc++ ! This really doesn't looks like the right approach :'(

DerThorsten commented 3 months ago

Plus all the libc headers that live in the system...

But the "system" might be of a different arch (ie the build machine, in my case apple-silicon) so taking anything from outside the "wasm-prefix" seems to be wrongish

.. not to speak about libstdc++

there is https://binji.github.io/wasm-clang/ I believe they literally copy all headers and libraries and have smth working.

https://github.com/binji/wasm-clang