Skip to content

Commit

Permalink
Speed up native AOT test build (#104880)
Browse files Browse the repository at this point in the history
Same as #82080, but this time we have #104763

Fixes #94102.
  • Loading branch information
MichalStrehovsky committed Jul 15, 2024
1 parent 9d24b13 commit 99ec785
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions src/tests/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -541,6 +541,11 @@
<Import Project="$(MSBuildThisFileDirectory)Common\runonly.targets" Condition="'$(CLRTestKind)' == 'RunOnly'" />

<PropertyGroup Condition="'$(TestBuildMode)' == 'nativeaot'">
<!-- The test infra already sets up the environment for native compilation.
The ILC targets don't have to do that. The batch script to set up environment
variables is horribly slow (seeing 1.4 seconds on a 11th gen Intel Core i7) -->
<IlcUseEnvironmentalTools>true</IlcUseEnvironmentalTools>

<!-- NativeAOT compiled output is placed into a 'native' subdirectory: we need to tweak
rpath so that the test can load its native library dependencies if there's any -->
<IlcRPath Condition="'$(TargetOS)' == 'osx' or '$(TargetsAppleMobile)' == 'true'">@executable_path/..</IlcRPath>
Expand Down

0 comments on commit 99ec785

Please sign in to comment.