Skip to content

Commit fb5f07f

Browse files
authored
Attempt to fix native AOT with CryptoKit (#76499)
1 parent 319391e commit fb5f07f

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/coreclr/nativeaot/BuildIntegration/Microsoft.NETCore.Native.Unix.targets

+5
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,7 @@ The .NET Foundation licenses this file to you under the MIT license.
7676

7777
<ItemGroup Condition="'$(TargetOS)' == 'OSX'">
7878
<NativeFramework Include="CoreFoundation" />
79+
<NativeFramework Include="CryptoKit" />
7980
<NativeFramework Include="Foundation" />
8081
<NativeFramework Include="Security" />
8182
<NativeFramework Include="GSS" />
@@ -98,9 +99,13 @@ The .NET Foundation licenses this file to you under the MIT license.
9899
<LinkerArg Include="-lstdc++" />
99100
<LinkerArg Include="-ldl" />
100101
<LinkerArg Include="-lm" />
102+
<LinkerArg Include="-lobjc" Condition="'$(TargetOS)' == 'OSX'" />
103+
<LinkerArg Include="-lswiftCore" Condition="'$(TargetOS)' == 'OSX'" />
104+
<LinkerArg Include="-lswiftFoundation" Condition="'$(TargetOS)' == 'OSX'" />
101105
<LinkerArg Include="-lz" />
102106
<LinkerArg Include="-lrt" Condition="'$(TargetOS)' != 'OSX'" />
103107
<LinkerArg Include="-licucore" Condition="'$(TargetOS)' == 'OSX'" />
108+
<LinkerArg Include="-L/usr/lib/swift" Condition="'$(TargetOS)' == 'OSX'" />
104109
<LinkerArg Include="@(StaticICULibs)" Condition="'$(StaticICULinking)' == 'true'" />
105110
<LinkerArg Include="-dynamiclib" Condition="'$(TargetOS)' == 'OSX' and '$(NativeLib)' == 'Shared'" />
106111
<LinkerArg Include="-shared" Condition="'$(TargetOS)' != 'OSX' and '$(NativeLib)' == 'Shared'" />

0 commit comments

Comments
 (0)