@@ -598,9 +598,9 @@ The .NET Foundation licenses this file to you under the MIT license.
598
598
<CustomLinkerArg Condition =" '$(WasmHtmlTemplate)' != ''" Include =" --shell-file " $(WasmHtmlTemplate)" " />
599
599
<CustomLinkerArg Condition =" '$(ExportsFile)' != '' and '$([System.IO.File]::ReadAllText($(ExportsFile)))' != ''" Include =" -s EXPORTED_FUNCTIONS=@" $(ExportsFile)" " />
600
600
<CustomLinkerArg Include =" -s ALLOW_MEMORY_GROWTH=1" />
601
- <CustomLinkerArg Include =" -s ERROR_ON_UNDEFINED_SYMBOLS=0" />
602
601
<CustomLinkerArg Include =" -s GLOBAL_BASE=$(IlcWasmGlobalBase)" />
603
602
<CustomLinkerArg Include =" -s TOTAL_STACK=$(IlcWasmStackSize)" />
603
+ <CustomLinkerArg Include =" -s ERROR_ON_UNDEFINED_SYMBOLS=0" Condition =" '$(IlcTreatWarningsAsErrors)' != 'true'" />
604
604
<CustomLinkerArg Condition =" '$(WasmEnableJSBigIntIntegration)' == 'true'" Include =" -s WASM_BIGINT=1" />
605
605
<CustomLinkerArg Condition =" '$(IlcLlvmExceptionHandlingModel)' == 'cpp'" Include =" -s DISABLE_EXCEPTION_CATCHING=0" />
606
606
@@ -612,18 +612,17 @@ The .NET Foundation licenses this file to you under the MIT license.
612
612
613
613
<!-- wasm-ld only supports listing exports on the command line -->
614
614
<ReadLinesFromFile File =" $(ExportsFile)" Condition =" '$(_targetOS)' == 'wasi' and '$(ExportsFile)' != ''" >
615
- <Output TaskParameter =" Lines" ItemName =" CustomLinkerArgExport " />
615
+ <Output TaskParameter =" Lines" ItemName =" _CustomLinkerArgExport " />
616
616
</ReadLinesFromFile >
617
617
618
618
<ItemGroup Condition =" '$(_targetOS)' == 'wasi'" >
619
- <CustomLinkerArg Include =" --sysroot=" $(WASI_SDK_PATH.Replace(" \" , " /" ))/share/wasi-sysroot" " />
620
- <CustomLinkerArg Include =" @(CustomLinkerArgExport->'-Wl,--export=%(Identity)')" />
621
- <!-- TODO-LLVM: change to 'warn-unresolved-symbols' once we have a WASI SDK with https://github.com/llvm/llvm-project/pull/78643. -->
622
- <CustomLinkerArg Include =" -Wl,--unresolved-symbols=ignore-all" />
623
- <CustomLinkerArg Include =" -lstdc++ -lwasi-emulated-process-clocks -lwasi-emulated-signal -lwasi-emulated-getpid" />
619
+ <CustomLinkerArg Include =" @(_CustomLinkerArgExport->'-Wl,--export=%(Identity)')" />
620
+ <CustomLinkerArg Include =" -lstdc++;-lwasi-emulated-process-clocks;-lwasi-emulated-signal;-lwasi-emulated-mman;-lwasi-emulated-getpid" />
624
621
<CustomLinkerArg Include =" -Wl,--max-memory=2147483648" />
625
622
<CustomLinkerArg Include =" -Wl,--global-base=$(IlcWasmGlobalBase)" />
626
623
<CustomLinkerArg Include =" -Wl,-z,stack-size=$(IlcWasmStackSize)" />
624
+ <CustomLinkerArg Include =" -Wl,--warn-unresolved-symbols" />
625
+ <CustomLinkerArg Include =" -Wl,--fatal-warnings" Condition =" '$(IlcTreatWarningsAsErrors)' == 'true'" />
627
626
<CustomLinkerArg Include =" -mexec-model=reactor" Condition =" '$(NativeLib)' == 'Shared'" />
628
627
</ItemGroup >
629
628
0 commit comments