[clang] [lld] [llvm] Conditionalize use of POSIX features missing on WASI/WebAssembly (PR #92677)

James Y Knight via llvm-commits llvm-commits at lists.llvm.org
Sun Jul 14 17:37:34 PDT 2024


================
@@ -71,6 +71,7 @@ ProcessInfo::ProcessInfo() : Pid(0), ReturnCode(0) {}
 ErrorOr<std::string> sys::findProgramByName(StringRef Name,
                                             ArrayRef<StringRef> Paths) {
   assert(!Name.empty() && "Must have a name!");
+#if !defined(__wasi__)
----------------
jyknight wrote:

Why doesn't this function work in wasi?

Although, actually, since process spawning doesn't even work in wasi, again, ISTM wasi should have its own llvm/lib/Support/WASI/Program.inc, which is just full of stub implementations, instead of ifdef'ing everything out here.

https://github.com/llvm/llvm-project/pull/92677


More information about the llvm-commits mailing list