From d4571551ab2962d5a06c2fd4c53c49164741ddfb Mon Sep 17 00:00:00 2001 From: Scott Waye Date: Tue, 4 Aug 2020 20:10:39 -0500 Subject: [PATCH] split llvm->wasm from wasm link --- .../Microsoft.NETCore.Native.targets | 29 ++++++++++++++++--- 1 file changed, 25 insertions(+), 4 deletions(-) diff --git a/src/BuildIntegration/Microsoft.NETCore.Native.targets b/src/BuildIntegration/Microsoft.NETCore.Native.targets index 0247f478c2d..6d2a6766aaa 100644 --- a/src/BuildIntegration/Microsoft.NETCore.Native.targets +++ b/src/BuildIntegration/Microsoft.NETCore.Native.targets @@ -37,8 +37,8 @@ The .NET Foundation licenses this file to you under the MIT license. .obj - .o - .bc + .o + .bc .lib .a @@ -61,6 +61,7 @@ The .NET Foundation licenses this file to you under the MIT license. .def .exports + $(NativeIntermediateOutputPath)$(TargetName)$(LlvmObjectExt) $(NativeIntermediateOutputPath)$(TargetName)$(NativeObjectExt) $(NativeOutputPath)$(TargetName)$(NativeBinaryExt) $(NativeIntermediateOutputPath)$(TargetName)$(ExportsFileExt) @@ -70,7 +71,7 @@ The .NET Foundation licenses this file to you under the MIT license. IlcCompile CppCompile - IlcCompile + WasmObject $(NativeOutputPath) $(NativeIntermediateOutputPath) @@ -275,6 +276,26 @@ The .NET Foundation licenses this file to you under the MIT license. + + + + + + "$(LlvmObject)" -c -o "$(NativeObject)" -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s DISABLE_EXCEPTION_CATCHING=0 + $(EmccArgs) -O2 + $(EmccArgs) -g3 + + + + + + + - "$(NativeObject)" -o "$(NativeBinary)" -s WASM=1 -s ALLOW_MEMORY_GROWTH=1 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s DISABLE_EXCEPTION_CATCHING=0 --emrun + "$(NativeObject)" -o "$(NativeBinary)" -s ALLOW_MEMORY_GROWTH=1 -s ERROR_ON_UNDEFINED_SYMBOLS=0 -s DISABLE_EXCEPTION_CATCHING=0 --emrun $(EmccArgs) "$(IlcPath)/sdk/libPortableRuntime.a" "$(IlcPath)/sdk/libbootstrappercpp.a" "$(IlcPath)/sdk/libSystem.Private.CoreLib.Native.a" $(EmccExtraArgs) $(EmccArgs) -O2 -flto $(EmccArgs) -g3