This is a quick question: the wasi-sdk-21.0.deb seems to install in /opt/wasi-sdk/ now whilst earlier it installed elsewhere -- or projects did so themselves. Is this the expected location going forward?
dpkg -L wasi-sdk | more
/.
/opt
/opt/wasi-sdk
/opt/wasi-sdk/bin
/opt/wasi-sdk/bin/clang-17
/opt/wasi-sdk/bin/clang-apply-replacements
/opt/wasi-sdk/bin/clang-format
/opt/wasi-sdk/bin/clang-tidy
/opt/wasi-sdk/bin/git-clang-format
/opt/wasi-sdk/bin/lld
/opt/wasi-sdk/bin/llvm-ar
/opt/wasi-sdk/bin/llvm-cxxfilt
/opt/wasi-sdk/bin/llvm-dwarfdump
/opt/wasi-sdk/bin/llvm-mc
/opt/wasi-sdk/bin/llvm-nm
/opt/wasi-sdk/bin/llvm-objcopy
/opt/wasi-sdk/bin/llvm-objdump
/opt/wasi-sdk/bin/llvm-size
/opt/wasi-sdk/bin/llvm-strings
/opt/wasi-sdk/bin/run-clang-tidy
I just want to know how/if I should rejigger this in several repos more consistently to which I'm contributing....
It has been in this place since the beginning: https://github.com/WebAssembly/wasi-sdk/commit/c80964d8d7cf8ca2480d8332cd8022cb0600d421#diff-76ed074a9305c04054cdebb9e9aad2d818052b07091de1f20cad0bbac34ffb52R5
I know I've definitely written janky "temporary" makefiles that assume this path too. I do wonder whether there's any push to rename in a more conventional cross-compiler way with binary names prefixed by a triple, e.g. wasm32-wasi-cc
, wasm32-wasi-ld
, etc? Then one wouldn't need to hardcode or look for a path with a name clang
that shadows a likely existing binary (cc @Dan Gohman )
GREAT! I've gone through so many different repos that do a manual installation that I think when I actually found out there was a deb I went through the moon. But now the older repos do not have the common install using the .deb.
Here's an example repo I'm going through and using for fun and kicks that does the manual version: https://github.com/dev-wasm/dev-wasm-feature/blob/2a1dcb74fcb9c0c7d7ab708a6f7317db4f4cc642/src/wasmtime-wasi/install.sh#L9-L33.
I see a LOT of that kind of thing.
so I was wondering what was the best path to migrate toward something standard.....
Chris Fallin said:
I know I've definitely written janky "temporary" makefiles that assume this path too. I do wonder whether there's any push to rename in a more conventional cross-compiler way with binary names prefixed by a triple, e.g.
wasm32-wasi-cc
,wasm32-wasi-ld
, etc? Then one wouldn't need to hardcode or look for a path with a nameclang
that shadows a likely existing binary (cc Dan Gohman )
squillace@dellsquill:~$ clang --version
Ubuntu clang version 14.0.0-1ubuntu1.1
Target: x86_64-pc-linux-gnu
Thread model: posix
InstalledDir: /usr/bin
squillace@dellsquill:~$ /opt/wasi-sdk/bin/clang --version
clang version 17.0.6
Target: wasm32-unknown-wasi
Thread model: posix
InstalledDir: /opt/wasi-sdk/bin
to be clear, not a critical issue. But as we move forward, I'd love to start hammering out repos I can contribute to.....
See also https://github.com/WebAssembly/wasi-sdk/pull/388 which is discussing target-prefixed binaries.
I didn't think target-prefixed binaries was a thing that clang did until now, but it appears they are, so maybe we should do that.
Last updated: Nov 22 2024 at 17:03 UTC