diff --git a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets index a630bc1d259..b6d09e476a1 100644 --- a/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets @@ -127,6 +127,7 @@ The .NET Foundation licenses this file to you under the MIT license. -O2 -Oz + wasm32-unknown-emscripten wasm32-unknown-wasi 1048576 $(EmccStackSize) @@ -387,10 +388,11 @@ The .NET Foundation licenses this file to you under the MIT license. - - - + + + + - -c $(WasmOptimizationSetting) + -mllvm -combiner-global-alias-analysis=false -mllvm -disable-lsr + $(CompileWasmArgs) -target $(IlcLlvmTarget) -c $(WasmOptimizationSetting) $(CompileWasmArgs) -g3 $(CompileWasmArgs) -mnontrapping-fptoint $(CompileWasmArgs) -fwasm-exceptions - $(CompileWasmArgs) -s DISABLE_EXCEPTION_CATCHING=0 + $(CompileWasmArgs) -mllvm -enable-emscripten-cxx-exceptions .bat - "$(EMSDK)/upstream/emscripten/emcc$(ScriptExt)" - "$(EmscriptenUpstreamEmscriptenPath)emcc$(ScriptExt)" - $(WasmCompilerPath) + "$(EMSDK)/upstream/bin/clang++" + "$(EmscriptenSdkToolsPath)bin/clang++" + "$(EMSDK)/upstream/emscripten/emcc$(ScriptExt)" + "$(EmscriptenSdkToolsPath)emscripten/emcc$(ScriptExt)" - $(CompileWasmArgs) -fvisibility=default -mllvm -combiner-global-alias-analysis=false -mllvm -disable-lsr --sysroot="$(WASI_SDK_PATH)/share/wasi-sysroot" -target $(IlcLlvmTarget) - - .exe - "$(WASI_SDK_PATH)/bin/clang++$(ExeExt)" + "$(WASI_SDK_PATH)/bin/clang++" "$(WASI_SDK_PATH)/bin/clang" diff --git a/src/coreclr/nativeaot/Runtime/regdisplay.h b/src/coreclr/nativeaot/Runtime/regdisplay.h index 739a4eec230..321901dc2f4 100644 --- a/src/coreclr/nativeaot/Runtime/regdisplay.h +++ b/src/coreclr/nativeaot/Runtime/regdisplay.h @@ -173,12 +173,10 @@ struct REGDISPLAY struct REGDISPLAY { - // TODO: WebAssembly doesn't really have registers. What exactly do we need here? - uintptr_t SP; PCODE IP; - inline PCODE GetIP() { return NULL; } + inline PCODE GetIP() { return IP; } inline uintptr_t GetSP() { return 0; } inline uintptr_t GetFP() { return 0; }