File tree Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Expand file tree Collapse file tree 2 files changed +24
-5
lines changed Original file line number Diff line number Diff line change @@ -1267,6 +1267,10 @@ toolchains::Darwin::constructInvocation(const LinkJobAction &job,
1267
1267
Arguments.push_back (" -force_load_swift_libs" );
1268
1268
} else {
1269
1269
Arguments.push_back (context.Args .MakeArgString (RuntimeLibPath));
1270
+ // FIXME: We probably shouldn't be adding an rpath here unless we know ahead
1271
+ // of time the standard library won't be copied. SR-1967
1272
+ Arguments.push_back (" -rpath" );
1273
+ Arguments.push_back (context.Args .MakeArgString (RuntimeLibPath));
1270
1274
}
1271
1275
1272
1276
if (context.Args .hasArg (options::OPT_profile_generate)) {
@@ -1305,11 +1309,6 @@ toolchains::Darwin::constructInvocation(const LinkJobAction &job,
1305
1309
Arguments.push_back (context.Args .MakeArgString (LibProfile));
1306
1310
}
1307
1311
1308
- // FIXME: We probably shouldn't be adding an rpath here unless we know ahead
1309
- // of time the standard library won't be copied.
1310
- Arguments.push_back (" -rpath" );
1311
- Arguments.push_back (context.Args .MakeArgString (RuntimeLibPath));
1312
-
1313
1312
// FIXME: Properly handle deployment targets.
1314
1313
assert (Triple.isiOS () || Triple.isWatchOS () || Triple.isMacOSX ());
1315
1314
if (Triple.isiOS ()) {
Original file line number Diff line number Diff line change 2
2
// RUN: %FileCheck %s < %t.simple.txt
3
3
// RUN: %FileCheck -check-prefix SIMPLE %s < %t.simple.txt
4
4
5
+ // RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-macosx10.9 -static-stdlib %s 2>&1 > %t.simple.txt
6
+ // RUN: %FileCheck -check-prefix SIMPLE_STATIC -implicit-check-not -rpath %s < %t.simple.txt
7
+
5
8
// RUN: %swiftc_driver -driver-print-jobs -target x86_64-apple-ios7.1 %s 2>&1 > %t.simple.txt
6
9
// RUN: %FileCheck -check-prefix IOS_SIMPLE %s < %t.simple.txt
7
10
69
72
// SIMPLE: -o linker
70
73
71
74
75
+ // SIMPLE_STATIC: swift
76
+ // SIMPLE_STATIC: -o [[OBJECTFILE:.*]]
77
+
78
+ // SIMPLE_STATIC-NEXT: bin/ld{{"? }}
79
+ // SIMPLE_STATIC: [[OBJECTFILE]]
80
+ // SIMPLE_STATIC: -lobjc
81
+ // SIMPLE_STATIC: -lSystem
82
+ // SIMPLE_STATIC: -arch x86_64
83
+ // SIMPLE_STATIC: -L [[STDLIB_PATH:[^ ]+/lib/swift_static/macosx]]
84
+ // SIMPLE_STATIC: -lc++
85
+ // SIMPLE_STATIC: -framework Foundation
86
+ // SIMPLE_STATIC: -force_load_swift_libs
87
+ // SIMPLE_STATIC: -macosx_version_min 10.{{[0-9]+}}.{{[0-9]+}}
88
+ // SIMPLE_STATIC: -no_objc_category_merging
89
+ // SIMPLE_STATIC: -o linker
90
+
91
+
72
92
// IOS_SIMPLE: swift
73
93
// IOS_SIMPLE: -o [[OBJECTFILE:.*]]
74
94
You can’t perform that action at this time.
0 commit comments