File tree 2 files changed +9
-3
lines changed
2 files changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -160,6 +160,10 @@ class BackendARM64 : CompilerBackend {
160
160
linkCommand ~= format(" -l%s" , lib);
161
161
}
162
162
163
+ if (os == " osx" ) {
164
+ linkCommand ~= " -lSystem -syslibroot `xcrun --sdk macosx --show-sdk-path`" ;
165
+ }
166
+
163
167
if (useLibc) {
164
168
if (os == " linux" ) {
165
169
string [] possiblePaths = [
@@ -184,7 +188,7 @@ class BackendARM64 : CompilerBackend {
184
188
}
185
189
}
186
190
else if (os == " osx" ) {
187
- linkCommand ~= " -lSystem -syslibroot `xcrun --sdk macosx --show-sdk-path` " ;
191
+ // Always supported and enabled.
188
192
}
189
193
else {
190
194
WarnNoInfo(" Cannot use libc on operating system '%s'" , os);
Original file line number Diff line number Diff line change @@ -201,7 +201,9 @@ class BackendX86_64 : CompilerBackend {
201
201
);
202
202
203
203
if (os == " osx" ) {
204
- linkCommand ~= " -ld_classic" ;
204
+ linkCommand ~= " -platform_version macos 10.6 `xcrun --sdk macosx --show-sdk-version`" ;
205
+ linkCommand ~= " -ld_classic -no_pie -e _main" ;
206
+ linkCommand ~= " -lSystem -syslibroot `xcrun --sdk macosx --show-sdk-path`" ;
205
207
}
206
208
207
209
foreach (ref lib ; link) {
@@ -235,7 +237,7 @@ class BackendX86_64 : CompilerBackend {
235
237
}
236
238
}
237
239
else if (os == " osx" ) {
238
- linkCommand ~= " -syslibroot `xcrun --sdk macosx --show-sdk-path` " ;
240
+ // Always supported and enabled.
239
241
}
240
242
else {
241
243
WarnNoInfo(" Cannot use libc on operating system '%s'" , os);
You can’t perform that action at this time.
0 commit comments