From ecf9174f917f1b0425fa63fd4a7c96fe1f94bfb8 Mon Sep 17 00:00:00 2001 From: Gleb Balykov Date: 2026年6月24日 18:06:01 +0300 Subject: [PATCH] Fix linking flags used during ILCompiler build Linker flags set in src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.targets in SetupOSSpecificProps do not consider platform specifics, which are set in toolchain.cmake. At the same time, LocateNativeCompiler in ./eng/toolAot.targets does similar job to get linker, and now GetCrossToolchainInfoAot in ./eng/toolAot.targets does same to get linker flags based on toolchain.cmake. toolchain.cmake is already used this way in src/libraries/System.Runtime.InteropServices/tests/TestAssets/NativeExports/NativeExports.csproj --- .../native/LocateNativeCompiler.targets | 24 +++++++++++++++++++ 1 file changed, 24 insertions(+) diff --git a/eng/common/native/LocateNativeCompiler.targets b/eng/common/native/LocateNativeCompiler.targets index 028b33d9444..7e42e3c0aaa 100644 --- a/eng/common/native/LocateNativeCompiler.targets +++ b/eng/common/native/LocateNativeCompiler.targets @@ -24,4 +24,28 @@ lld + + + + + + + + + <_toolchainlinkerargs>$([System.Text.RegularExpressions.Regex]::Match('$(_ToolchainInfoOutput)', '<linker-args>([^<]*)</linker-args>').Groups[1].Value) + + + + + +

AltStyle によって変換されたページ (->オリジナル) /