@@ -105,6 +105,23 @@ The .NET Foundation licenses this file to you under the MIT license.
105
105
<NativeFramework Condition =" !$(_targetOS.StartsWith('tvos'))" Include =" GSS" />
106
106
</ItemGroup >
107
107
108
+ <ItemGroup >
109
+ <NativeSystemLibrary Include =" stdc++" Condition =" '$(LinkStandardCPlusPlusLibrary)' == 'true'" />
110
+ <NativeSystemLibrary Include =" dl" />
111
+ <NativeSystemLibrary Include =" objc" Condition =" '$(_IsApplePlatform)' == 'true'" />
112
+ <NativeSystemLibrary Include =" swiftCore" Condition =" '$(_targetOS)' == 'osx'" />
113
+ <NativeSystemLibrary Include =" swiftFoundation" Condition =" '$(_targetOS)' == 'osx'" />
114
+ <NativeSystemLibrary Include =" z" />
115
+ <NativeSystemLibrary Include =" rt" Condition =" '$(_IsApplePlatform)' != 'true' and '$(_linuxLibcFlavor)' != 'bionic'" />
116
+ <NativeSystemLibrary Include =" log" Condition =" '$(_linuxLibcFlavor)' == 'bionic'" />
117
+ <NativeSystemLibrary Include =" icucore" Condition =" '$(_IsApplePlatform)' == 'true'" />
118
+ <NativeSystemLibrary Include =" m" />
119
+ </ItemGroup >
120
+
121
+ <ItemGroup >
122
+ <ExtraLinkerArg Include =" -segprot,__THUNKS,rx,rx" Condition =" '$(_IsiOSLikePlatform)' == 'true'" />
123
+ </ItemGroup >
124
+
108
125
<ItemGroup >
109
126
<LinkerArg Include =" -gz=zlib" Condition =" '$(CompressSymbols)' != 'false'" />
110
127
<LinkerArg Include =" -fuse-ld=$(LinkerFlavor)" Condition =" '$(LinkerFlavor)' != ''" />
@@ -120,19 +137,10 @@ The .NET Foundation licenses this file to you under the MIT license.
120
137
<LinkerArg Include =" -Wl,--as-needed" Condition =" '$(_IsApplePlatform)' != 'true'" />
121
138
<LinkerArg Include =" -Wl,-e0x0" Condition =" '$(NativeLib)' == 'Shared' and '$(_IsApplePlatform)' != 'true'" />
122
139
<LinkerArg Include =" -pthread" Condition =" '$(_IsApplePlatform)' != 'true'" />
123
- <LinkerArg Include =" -lstdc++" Condition =" '$(LinkStandardCPlusPlusLibrary)' == 'true'" />
124
- <LinkerArg Include =" -ldl" />
125
- <LinkerArg Include =" -lobjc" Condition =" '$(_IsApplePlatform)' == 'true'" />
126
- <LinkerArg Include =" -lswiftCore" Condition =" '$(_targetOS)' == 'osx'" />
127
- <LinkerArg Include =" -lswiftFoundation" Condition =" '$(_targetOS)' == 'osx'" />
128
- <LinkerArg Include =" -lz" />
129
- <LinkerArg Include =" -lrt" Condition =" '$(_IsApplePlatform)' != 'true' and '$(_linuxLibcFlavor)' != 'bionic'" />
130
- <LinkerArg Include =" -llog" Condition =" '$(_linuxLibcFlavor)' == 'bionic'" />
131
- <LinkerArg Include =" -licucore" Condition =" '$(_IsApplePlatform)' == 'true'" />
140
+ <LinkerArg Include =" @(NativeSystemLibrary->'-l%(Identity)')" />
132
141
<LinkerArg Include =" -L/usr/lib/swift" Condition =" '$(_targetOS)' == 'osx'" />
133
142
<LinkerArg Include =" @(StaticICULibs)" Condition =" '$(StaticICULinking)' == 'true'" />
134
143
<LinkerArg Include =" @(StaticSslLibs)" Condition =" '$(StaticOpenSslLinking)' == 'true'" />
135
- <LinkerArg Include =" -lm" />
136
144
<LinkerArg Include =" -static" Condition =" '$(StaticExecutable)' == 'true' and '$(PositionIndependentExecutable)' == 'false'" />
137
145
<LinkerArg Include =" -static-pie" Condition =" '$(StaticExecutable)' == 'true' and '$(PositionIndependentExecutable)' != 'false'" />
138
146
<LinkerArg Include =" -dynamiclib" Condition =" '$(_IsApplePlatform)' == 'true' and '$(NativeLib)' == 'Shared'" />
@@ -152,7 +160,7 @@ The .NET Foundation licenses this file to you under the MIT license.
152
160
<LinkerArg Include =" -L/usr/local/lib -lgssapi_krb5" Condition =" '$(_targetOS)' == 'freebsd'" />
153
161
<!-- FreeBSD's inotify is an installed package and not found in default libraries -->
154
162
<LinkerArg Include =" -L/usr/local/lib -linotify" Condition =" '$(_targetOS)' == 'freebsd'" />
155
- <LinkerArg Include =" - Wl,-segprot,__THUNKS,rx,rx " Condition = " '$(_IsiOSLikePlatform)' == 'true' " />
163
+ <LinkerArg Include =" @(ExtraLinkerArg->'- Wl,%(Identity)') " />
156
164
<LinkerArg Include =" @(NativeFramework->'-framework %(Identity)')" Condition =" '$(_IsApplePlatform)' == 'true'" />
157
165
<LinkerArg Include =" -Wl,--eh-frame-hdr" Condition =" '$(_IsApplePlatform)' != 'true'" />
158
166
</ItemGroup >
0 commit comments