SteveSandersonMS / dotnet-wasi-sdk

Packages for building .NET projects as standalone WASI-compliant modules
518 stars 36 forks source link

Customise compilation options #33

Open itowlson opened 2 years ago

itowlson commented 2 years ago

We are hitting an issue with Wizering our code after the 1.2 upgrade. We are using wit-bindgen, which generates memcpy statements, and WASI SDK 16 is compiling them using the bulk memory proposal. But Wizer currently fails if it encounters a bulk memory opcode.

I believe we could force WASI SDK to downgrade by passing clang the -mno-bulk-memory flag. But of course it would be unwelcome to force that on non-Wizering consumers.

Is there a way to inject that into the <WasiSdkClangArgs> property from a consumer of Wasi.Sdk? If not, would it be possible to provide one, e.g. in a similar way to native file references?

radu-matei commented 2 years ago

ref https://github.com/bytecodealliance/wizer/pull/57