Skip to content

Commit f631133

Browse files
authored
[wasm] improve local diagnostic of AOT enabled build (#108059)
* [wasm] improve local diagnostic of AOT build Add 2 private msbuild properties to allow debug AOT build and using local llvm build artifacts * Use the right prop name
1 parent 557c45e commit f631133

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

src/mono/llvm/llvm-init.proj

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,9 @@
8787
<Target Name="CopyLLVMToTree" AfterTargets="Build">
8888
<ItemGroup>
8989
<LLVMFiles Include="$(NuGetPackageRoot)\$([System.String]::Copy(%(PackageReference.Identity)).ToLowerInvariant())\%(PackageReference.Version)\tools\$(MonoLLVMHostOS)-%(PackageReference.PackageArch)\**"
90-
FileArch="%(PackageReference.PackageArch)" />
90+
FileArch="%(PackageReference.PackageArch)" Condition="'$(_LocalLLVMArtifacts)' == ''" />
91+
<LLVMFiles Include="$(_LocalLLVMArtifacts)\obj\InstallRoot-$(BuildArchitecture)\**"
92+
FileArch="%(PackageReference.PackageArch)" Condition="'$(_LocalLLVMArtifacts)' != ''" />
9193
</ItemGroup>
9294
<Copy SourceFiles="@(LLVMFiles)" DestinationFolder="$(MonoLLVMDir)\%(LLVMFiles.FileArch)\%(RecursiveDir)">
9395
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>

src/mono/wasm/build/WasmApp.Common.targets

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -621,7 +621,7 @@
621621

622622
<Error Condition="'$(RunAOTCompilation)' == 'true' and '$(PublishTrimmed)' != 'true'"
623623
Text="AOT is not supported without IL trimming (PublishTrimmed=true required)." />
624-
<Error Condition="'$(RunAOTCompilation)' == 'true' and '$(Configuration)' == 'Debug'"
624+
<Error Condition="'$(RunAOTCompilation)' == 'true' and '$(Configuration)' == 'Debug' and '$(_WasmAllowAOTDebug)' != 'true'"
625625
Text="AOT is not supported in debug configuration (Configuration=Release required)." />
626626
<Error Condition="'@(_WasmAssembliesInternal)' == ''" Text="Item _WasmAssembliesInternal is empty" />
627627
<Error Condition="'$(_IsToolchainMissing)' == 'true'"

0 commit comments

Comments
 (0)