TVM web build error, and unrecognised target

Many thanks, the first level issue has been fixed, in #13967.

The 2nd level issue I have is doing the code-gen for WASM. It seems that the previous syntax of putting -system-lib in the target string is no longer valid.

I have ammended the target string in the old webgpu example to replace -target with -mtriple. However I’m not sure what the new syntax for --system-lib is.

What I’m working with right now is: llvm -mtriple=wasm32-unknown-unknown --system-lib

Which generates the error:

Error when parsing target["system-lib"]: Cannot recognize 'system-lib'. Candidates are: cl-opt, opt-level, fast-math-contract, fast-math-nsz, fast-math-nnan, fast-math-arcp, fast-math, keys, target_device_type, device, tag, model, num-cores, mcpu, host, mattr, fast-math-ninf, mtriple, libs, mfloat-abi, fast-math-reassoc, from_device, mabi. Target creation from string failed: llvm -mtriple=wasm32-unknown-unknown --system-lib

The last post I’ve found mentioning -system-lib is this unanswered question from 2021. I’m not entirely sure what the flag was meant to do, or how it is invoked in newer versions of TVM.