Do not quote rpath passed to linker for Bionic (#87669)
authorMichal Strehovský <MichalStrehovsky@users.noreply.github.com>
Fri, 16 Jun 2023 23:36:56 +0000 (08:36 +0900)
committerGitHub <noreply@github.com>
Fri, 16 Jun 2023 23:36:56 +0000 (16:36 -0700)
* Do not quote rpath passed to linker

Looks like this is preserved literally, with the `'`.

The Android loader doesn't like this: `WARNING: linker: Warning: unable to normalize "'/data/data/com.termux/files/home'" (ignoring)`.

* Update Microsoft.NETCore.Native.Unix.targets

* Apply suggestions from code review

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
---------

Co-authored-by: Jan Kotas <jkotas@microsoft.com>
src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets

index c2cdf16..edaae4c 100644 (file)
@@ -112,7 +112,7 @@ The .NET Foundation licenses this file to you under the MIT license.
       <LinkerArg Include="-arch $(CrossCompileArch)" Condition="'$(_IsApplePlatform)' == 'true' and '$(CrossCompileArch)' != ''" />
       <LinkerArg Include="-g" Condition="$(NativeDebugSymbols) == 'true'" />
       <LinkerArg Include="-Wl,--strip-debug" Condition="$(NativeDebugSymbols) != 'true' and '$(_IsApplePlatform)' != 'true'" />
-      <LinkerArg Include="-Wl,-rpath,'$(IlcRPath)'" Condition="'$(StaticExecutable)' != 'true'" />
+      <LinkerArg Include="'-Wl,-rpath,$(IlcRPath)'" Condition="'$(StaticExecutable)' != 'true'" />
       <LinkerArg Include="-Wl,--build-id=sha1" Condition="'$(_IsApplePlatform)' != 'true'" />
       <LinkerArg Include="-Wl,--as-needed" Condition="'$(_IsApplePlatform)' != 'true'" />
       <LinkerArg Include="-Wl,-e0x0" Condition="'$(NativeLib)' == 'Shared' and '$(_IsApplePlatform)' != 'true'" />