I cross-compile using emscripten but in fact the question is for any cross-compilation.
I do supply the cross-file and if I use absolute path for the compiler tools all is fine. But of course this is not portable. When trying to set the path relative I can not find the correct relative path.
Here is my project structure
root
|
-> wasm-cross-meson.txt
-> emsdk/ <- This is where the compile resides
-> build/jose <- jose is a submodule and this is what meson is building
-> build/ other stuff here to related to meosn nor jose (vcpkg, etc.)
...
Obviously meson setup
is using build/jose
for its builddir. And --cross-file
calls out wasm-cross-meson.txt as it should.
In wasm-cross-meson.txt I try to set c (and other tools) to:
- ./emsdk/upstream/emscripten/emcc (thinking that the current dir is where is wasm-cross-meson.txt)
- ../emsdk/upstream/emscripten/emcc (don’t know why but why not….)
- ../../emsdk/upstream/emscripten/emcc (thinking that the current dir is build/jose)
In all cases, meson complains not finding emcc
I have no clue where to go from here.