Skip to content

Commit 6005119

Browse files
Don't try to set RPATH on Windows (#116063)
Should avoid ``` LINK : warning LNK4044: unrecognized option '/Wl,-rpath,'$ORIGIN/..''; ignored [d:\git\runtime2\src\tests\nativeaot\Smo keTests\UnitTests\UnitTests.csproj] ```
1 parent b8ff802 commit 6005119

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

src/tests/Directory.Build.targets

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -574,8 +574,8 @@
574574

575575
<!-- NativeAOT compiled output is placed into a 'native' subdirectory: we need to set
576576
rpath so that the test can load its native library dependencies if there's any -->
577-
<LinkerArg Include="-Wl,-rpath,'@executable_path/..'" Condition="'$(SetIlcRPath)' != 'false' and '$(TargetOS)' != 'win' and ('$(TargetOS)' == 'osx' or '$(TargetsAppleMobile)' == 'true')" />
578-
<LinkerArg Include="-Wl,-rpath,'$ORIGIN/..'" Condition="'$(SetIlcRPath)' != 'false' and '$(TargetOS)' != 'win' and '$(TargetOS)' != 'osx' and '$(TargetsAppleMobile)' != 'true'" />
577+
<LinkerArg Include="-Wl,-rpath,'@executable_path/..'" Condition="'$(SetIlcRPath)' != 'false' and ('$(TargetOS)' == 'osx' or '$(TargetsAppleMobile)' == 'true')" />
578+
<LinkerArg Include="-Wl,-rpath,'$ORIGIN/..'" Condition="'$(SetIlcRPath)' != 'false' and '$(TargetOS)' != 'windows' and '$(TargetOS)' != 'osx' and '$(TargetsAppleMobile)' != 'true'" />
579579
</ItemGroup>
580580

581581
<Import Project="$(RepositoryEngineeringDir)nativeSanitizers.targets" Condition="'$(TestBuildMode)' == 'nativeaot'" />

0 commit comments

Comments
 (0)