File tree Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Expand file tree Collapse file tree 2 files changed +33
-0
lines changed Original file line number Diff line number Diff line change @@ -660,6 +660,15 @@ void toolchains::Darwin::addPlatformSpecificPluginFrontendArgs(
660
660
llvm::sys::path::remove_filename (platformPath); // specific SDK
661
661
llvm::sys::path::remove_filename (platformPath); // SDKs
662
662
llvm::sys::path::remove_filename (platformPath); // Developer
663
+
664
+ StringRef platformName = llvm::sys::path::filename (platformPath);
665
+ if (platformName.endswith (" Simulator.platform" )){
666
+ StringRef devicePlatformName =
667
+ platformName.drop_back (strlen (" Simulator.platform" ));
668
+ llvm::sys::path::remove_filename (platformPath); // Platform
669
+ llvm::sys::path::append (platformPath, devicePlatformName + " OS.platform" );
670
+ }
671
+
663
672
llvm::sys::path::append (platformPath, " Developer" );
664
673
addExternalPluginFrontendArgs (platformPath, inputArgs, arguments);
665
674
}
Original file line number Diff line number Diff line change
1
+ // RUN: %target-swiftc_driver -driver-print-jobs -target x86_64-apple-ios15.0-simulator %s 2>&1 | %FileCheck %s
2
+ // REQUIRES: OS=ios
3
+
4
+ // CHECK: -external-plugin-path
5
+ // CHECK-SAME: .sdk/usr/lib/swift/host/plugins#
6
+ // CHECK-SAME: .sdk/usr/bin/swift-plugin-server
7
+
8
+ // CHECK-SAME: -external-plugin-path
9
+ // CHECK-SAME: .sdk/usr/local/lib/swift/host/plugins#
10
+ // CHECK-SAME: .sdk/usr/bin/swift-plugin-server
11
+
12
+ // CHECK-SAME: -external-plugin-path
13
+ // CHECK-SAME: iPhoneOS.platform/Developer/usr/lib/swift/host/plugins#
14
+ // CHECK-SAME: iPhoneOS.platform/Developer/usr/bin/swift-plugin-server
15
+
16
+ // CHECK-SAME: -external-plugin-path
17
+ // CHECK-SAME: iPhoneOS.platform/Developer/usr/local/lib/swift/host/plugins#
18
+ // CHECK-SAME: iPhoneOS.platform/Developer/usr/bin/swift-plugin-server
19
+
20
+ // CHECK-SAME: -plugin-path
21
+ // CHECK-SAME: {{(/|\\\\)}}lib{{(/|\\\\)}}swift{{(/|\\\\)}}host{{(/|\\\\)}}plugins
22
+
23
+ // CHECK-SAME: -plugin-path
24
+ // CHECK-SAME: {{(/|\\\\)}}local{{(/|\\\\)}}lib{{(/|\\\\)}}swift{{(/|\\\\)}}host{{(/|\\\\)}}plugins
You can’t perform that action at this time.
0 commit comments