Skip to content

Commit

Permalink
Build tests as self-contained for native AOT (#95718)
Browse files Browse the repository at this point in the history
  • Loading branch information
MichalStrehovsky authored Dec 7, 2023
1 parent 5b0f743 commit ee1abba
Show file tree
Hide file tree
Showing 3 changed files with 11 additions and 0 deletions.
3 changes: 3 additions & 0 deletions eng/testing/tests.singlefile.targets
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,9 @@
<TrimMode>partial</TrimMode>
<SuppressTrimAnalysisWarnings>true</SuppressTrimAnalysisWarnings>
<TrimmerSingleWarn>false</TrimmerSingleWarn>

<!-- Forced by ILLink targets -->
<SelfContained>true</SelfContained>
</PropertyGroup>

<!-- Needed for the amd64 -> amd64 musl cross-build to pass the target flag. -->
Expand Down
3 changes: 3 additions & 0 deletions src/mono/msbuild/apple/data/ProxyProjectForAOTOnHelix.proj
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,9 @@
<_IsApplePlatform>true</_IsApplePlatform>
<TargetsAppleMobile>true</TargetsAppleMobile>
<_targetOS>$(TargetOS)</_targetOS>

<!-- Forced by ILLink targets -->
<SelfContained>true</SelfContained>
</PropertyGroup>

<ItemGroup Condition="'$(UseNativeAOTRuntime)' == 'true'">
Expand Down
5 changes: 5 additions & 0 deletions src/tests/Directory.Build.targets
Original file line number Diff line number Diff line change
Expand Up @@ -567,6 +567,11 @@
<BuildNativeAotFrameworkObjects Condition="'$(IlcMultiModule)' == 'true'">true</BuildNativeAotFrameworkObjects>
<DisableFrameworkLibGeneration Condition="'$(BuildNativeAotFrameworkObjects)' == 'true'">true</DisableFrameworkLibGeneration>
<FrameworkLibPath Condition="'$(BuildNativeAotFrameworkObjects)' == 'true'">$(IlcSdkPath)</FrameworkLibPath>

<!-- Forced by ILLink targets -->
<SelfContained>true</SelfContained>
<HasRuntimeOutput>false</HasRuntimeOutput>
<_UsingDefaultForHasRuntimeOutput>false</_UsingDefaultForHasRuntimeOutput>
</PropertyGroup>

<ItemGroup Condition="'$(TestBuildMode)' == 'nativeaot'">
Expand Down

0 comments on commit ee1abba

Please sign in to comment.