Skip to content

Commit

Permalink
[wasm] improve local diagnostic of AOT enabled build (#108059)
Browse files Browse the repository at this point in the history
* [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
  • Loading branch information
radekdoulik committed Sep 22, 2024
1 parent 557c45e commit f631133
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
4 changes: 3 additions & 1 deletion src/mono/llvm/llvm-init.proj
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,9 @@
<Target Name="CopyLLVMToTree" AfterTargets="Build">
<ItemGroup>
<LLVMFiles Include="$(NuGetPackageRoot)\$([System.String]::Copy(%(PackageReference.Identity)).ToLowerInvariant())\%(PackageReference.Version)\tools\$(MonoLLVMHostOS)-%(PackageReference.PackageArch)\**"
FileArch="%(PackageReference.PackageArch)" />
FileArch="%(PackageReference.PackageArch)" Condition="'$(_LocalLLVMArtifacts)' == ''" />
<LLVMFiles Include="$(_LocalLLVMArtifacts)\obj\InstallRoot-$(BuildArchitecture)\**"
FileArch="%(PackageReference.PackageArch)" Condition="'$(_LocalLLVMArtifacts)' != ''" />
</ItemGroup>
<Copy SourceFiles="@(LLVMFiles)" DestinationFolder="$(MonoLLVMDir)\%(LLVMFiles.FileArch)\%(RecursiveDir)">
<Output TaskParameter="DestinationFiles" ItemName="FileWrites"/>
Expand Down
2 changes: 1 addition & 1 deletion src/mono/wasm/build/WasmApp.Common.targets
Original file line number Diff line number Diff line change
Expand Up @@ -621,7 +621,7 @@

<Error Condition="'$(RunAOTCompilation)' == 'true' and '$(PublishTrimmed)' != 'true'"
Text="AOT is not supported without IL trimming (PublishTrimmed=true required)." />
<Error Condition="'$(RunAOTCompilation)' == 'true' and '$(Configuration)' == 'Debug'"
<Error Condition="'$(RunAOTCompilation)' == 'true' and '$(Configuration)' == 'Debug' and '$(_WasmAllowAOTDebug)' != 'true'"
Text="AOT is not supported in debug configuration (Configuration=Release required)." />
<Error Condition="'@(_WasmAssembliesInternal)' == ''" Text="Item _WasmAssembliesInternal is empty" />
<Error Condition="'$(_IsToolchainMissing)' == 'true'"
Expand Down

0 comments on commit f631133

Please sign in to comment.