This PR uses an absolute path for the clang++ args as the working directory cannot be assumed.
I was using MSBuild executable path = "C:\Program Files\dotnet\sdk\8.0.100-preview.5.23303.2\MSBuild.dll"
and a local package directory, i.e. nuget.config like
And I observed from dotnet publish -r wasi-wasm -c Release /p:MSBuildEnableWorkloadResolver=false --self-contained /p:UseAppHost=false /bl that the clang++ command was failing with, for example:
clang++ : error : no such file or directory: 'obj\Release\net8.0\wasi-wasm\native\cswasi.external.bc' [E:\GitHub\cs-wit
-bindgen\.packages\microsoft.dotnet.ilcompiler.llvm\8.0.0-preview.7.23354.2\build\ExecWrapper.proj]
clang++ : error : no input files [E:\GitHub\cs-wit-bindgen\.packages\microsoft.dotnet.ilcompiler.llvm\8.0.0-preview.7.2
3354.2\build\ExecWrapper.proj]
The input files were present, but adding dir && .... to the exec command revealed the current working directory was
Directory of E:\GitHub\cs-wit-bindgen\.packages\microsoft.dotnet.ilcompiler.llvm\8.0.0-preview.7.23354.2\build
This PR uses an absolute path for the
clang++
args as the working directory cannot be assumed.I was using
MSBuild executable path = "C:\Program Files\dotnet\sdk\8.0.100-preview.5.23303.2\MSBuild.dll"
and a local package directory, i.e.nuget.config
likeAnd I observed from
dotnet publish -r wasi-wasm -c Release /p:MSBuildEnableWorkloadResolver=false --self-contained /p:UseAppHost=false /bl
that the clang++ command was failing with, for example:The input files were present, but adding
dir && ....
to the exec command revealed the current working directory was