File tree Expand file tree Collapse file tree 5 files changed +24
-10
lines changed Expand file tree Collapse file tree 5 files changed +24
-10
lines changed Original file line number Diff line number Diff line change @@ -154,7 +154,7 @@ let package = Package(
154
154
. product( name: " SwiftToolsSupport-auto " , package : " swift-tools-support-core " ) ,
155
155
. product( name: " SystemPackage " , package : " swift-system " ) ,
156
156
] ,
157
- exclude: [ " CMakeLists.txt " ]
157
+ exclude: [ " CMakeLists.txt " , " Vendor/README.md " ]
158
158
) ,
159
159
160
160
. target(
Original file line number Diff line number Diff line change
1
+ # README
2
+
3
+ The Triple.swift and Triple+Platform.swift files in this directory have been
4
+ vendored from SwiftDriver. The purpose of this approach is to avoid
5
+ introducing a dependency on Driver in the "data model" section of SwiftPM,
6
+ which could currently lead to complications with the Xcode integration.
7
+
8
+ In the long term, our goal is to consolidate this code into a shared
9
+ implementation that can be utilized by both SwiftPM and SwiftDriver through a
10
+ package. However, until we reach that point, it is important to keep the files
11
+ in this directory up to date by incorporating any relevant additions from the
12
+ original copies.
13
+
14
+ Moreover, it is crucial to note that any modifications made to these files
15
+ should be first applied to the original files in SwiftDriver, and then copied
16
+ over to this directory to maintain synchronization.
Original file line number Diff line number Diff line change 13
13
//===----------------------------------------------------------------------===//
14
14
//
15
15
// Warning: This file has been copied with minimal modifications from
16
- // swift-driver to avoid a direct dependency (for now). Any modification to this
17
- // file, must first be made in the original file, then copied here.
16
+ // swift-driver to avoid a direct dependency. See Vendor/README.md for details.
18
17
//
19
18
// Changes:
20
19
// - Replaced usage of `\(_:or:)` string interpolation.
Original file line number Diff line number Diff line change 13
13
//===----------------------------------------------------------------------===//
14
14
//
15
15
// Warning: This file has been copied with minimal modifications from
16
- // swift-driver to avoid a direct dependency (for now). Any modification to this
17
- // file, must first be made in the original file, then copied here.
16
+ // swift-driver to avoid a direct dependency. See Vendor/README.md for details.
18
17
//
19
18
// Changes:
20
19
// - Replaced usage of `\(_:or:)` string interpolation.
Original file line number Diff line number Diff line change @@ -716,32 +716,32 @@ public final class UserToolchain: Toolchain {
716
716
// (~5.7), we always had a singular installed SDK. Prefer the
717
717
// new variant which has an architecture subdirectory in `bin`
718
718
// if available.
719
- switch triple. archName . lowercased ( ) {
720
- case " x86_64 " , " x86_64h " :
719
+ switch triple. arch { // Name .lowercased() {
720
+ case . x86_64: // amd64 x86_64 x86_64h
721
721
let path : AbsolutePath =
722
722
xctest. appending ( " usr " )
723
723
. appending ( " bin64 " )
724
724
if localFileSystem. exists ( path) {
725
725
return path
726
726
}
727
727
728
- case " i686 " :
728
+ case . x86 : // i386 i486 i586 i686 i786 i886 i986
729
729
let path : AbsolutePath =
730
730
xctest. appending ( " usr " )
731
731
. appending ( " bin32 " )
732
732
if localFileSystem. exists ( path) {
733
733
return path
734
734
}
735
735
736
- case " armv7 " :
736
+ case . arm : // armv7 and many more
737
737
let path : AbsolutePath =
738
738
xctest. appending ( " usr " )
739
739
. appending ( " bin32a " )
740
740
if localFileSystem. exists ( path) {
741
741
return path
742
742
}
743
743
744
- case " arm64 " :
744
+ case . aarch64 : // aarch6 arm64
745
745
let path : AbsolutePath =
746
746
xctest. appending ( " usr " )
747
747
. appending ( " bin64a " )
You can’t perform that action at this time.
0 commit comments