Skip to content

Commit 27a5165

Browse files
committed
Stop applying swift-build patch to trunk branch on CI because of changes upstream
1 parent 63a65a0 commit 27a5165

File tree

3 files changed

+88
-88
lines changed

3 files changed

+88
-88
lines changed

.github/workflows/sdks.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -134,7 +134,7 @@ jobs:
134134
if ${{ matrix.version == 'trunk' }}; then
135135
git apply swift-android-trunk-libdispatch.patch
136136
else
137-
git apply swift-android-devel.patch
137+
git apply swift-android-devel.patch swift-android-ci-devel.patch
138138
fi
139139
git apply -C2 swift-android-ci-except-release.patch swift-android-testing-except-release.patch
140140
BUILD_FLAG="--cross-compile-build-swift-tools=0"

swift-android-ci-devel.patch

Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
diff --git a/swift-build/Sources/SWBUtil/FSProxy.swift b/swift-build/Sources/SWBUtil/FSProxy.swift
2+
index b446d21..f88f3c3 100644
3+
--- a/swift-build/Sources/SWBUtil/FSProxy.swift
4+
+++ b/swift-build/Sources/SWBUtil/FSProxy.swift
5+
@@ -49,7 +49,7 @@ public struct FileInfo: Equatable, Sendable {
6+
#if os(Windows)
7+
return (statBuf.st_mode & UInt16(ucrt.S_IFREG)) != 0
8+
#else
9+
- return (statBuf.st_mode & S_IFREG) != 0
10+
+ return (mode_t(statBuf.st_mode) & S_IFREG) != 0
11+
#endif
12+
}
13+
14+
@@ -57,7 +57,7 @@ public struct FileInfo: Equatable, Sendable {
15+
#if os(Windows)
16+
return (statBuf.st_mode & UInt16(ucrt.S_IFDIR)) != 0
17+
#else
18+
- return (statBuf.st_mode & S_IFDIR) != 0
19+
+ return (mode_t(statBuf.st_mode) & S_IFDIR) != 0
20+
#endif
21+
}
22+
23+
@@ -65,7 +65,7 @@ public struct FileInfo: Equatable, Sendable {
24+
#if os(Windows)
25+
return (statBuf.st_mode & UInt16(S_IFLNK)) == S_IFLNK
26+
#else
27+
- return (statBuf.st_mode & S_IFMT) == S_IFLNK
28+
+ return (mode_t(statBuf.st_mode) & S_IFMT) == S_IFLNK
29+
#endif
30+
}
31+
32+
@@ -75,7 +75,7 @@ public struct FileInfo: Equatable, Sendable {
33+
// Don't use FileManager.isExecutableFile due to https://github.com/swiftlang/swift-foundation/issues/860
34+
return (statBuf.st_mode & UInt16(_S_IEXEC)) != 0
35+
#else
36+
- return (statBuf.st_mode & S_IXUSR) != 0
37+
+ return (mode_t(statBuf.st_mode) & S_IXUSR) != 0
38+
#endif
39+
}
40+
41+
@@ -1395,9 +1395,9 @@ public class PseudoFS: FSProxy, @unchecked Sendable {
42+
#else
43+
info.st_mtimespec = timespec(tv_sec: time_t(node.timestamp), tv_nsec: 0)
44+
#endif
45+
- info.st_size = off_t(contents.bytes.count)
46+
- info.st_dev = node.device
47+
- info.st_ino = node.inode
48+
+ info.st_size = numericCast(contents.bytes.count)
49+
+ info.st_dev = numericCast(node.device)
50+
+ info.st_ino = numericCast(node.inode)
51+
return createFileInfo(info)
52+
case .directory(let dir):
53+
var info = stat()
54+
@@ -1405,12 +1405,12 @@ public class PseudoFS: FSProxy, @unchecked Sendable {
55+
info.st_mode = UInt16(ucrt.S_IFDIR)
56+
info.st_mtimespec = timespec(tv_sec: Int64(node.timestamp), tv_nsec: 0)
57+
#else
58+
- info.st_mode = S_IFDIR
59+
+ info.st_mode = numericCast(S_IFDIR)
60+
info.st_mtimespec = timespec(tv_sec: time_t(node.timestamp), tv_nsec: 0)
61+
#endif
62+
- info.st_size = off_t(dir.contents.count)
63+
- info.st_dev = node.device
64+
- info.st_ino = node.inode
65+
+ info.st_size = numericCast(dir.contents.count)
66+
+ info.st_dev = numericCast(node.device)
67+
+ info.st_ino = numericCast(node.inode)
68+
return createFileInfo(info)
69+
case .symlink(_):
70+
var info = stat()
71+
@@ -1418,12 +1418,12 @@ public class PseudoFS: FSProxy, @unchecked Sendable {
72+
info.st_mode = UInt16(S_IFLNK)
73+
info.st_mtimespec = timespec(tv_sec: Int64(node.timestamp), tv_nsec: 0)
74+
#else
75+
- info.st_mode = S_IFLNK
76+
+ info.st_mode = numericCast(S_IFLNK)
77+
info.st_mtimespec = timespec(tv_sec: time_t(node.timestamp), tv_nsec: 0)
78+
#endif
79+
- info.st_size = off_t(0)
80+
- info.st_dev = node.device
81+
- info.st_ino = node.inode
82+
+ info.st_size = numericCast(0)
83+
+ info.st_dev = numericCast(node.device)
84+
+ info.st_ino = numericCast(node.inode)
85+
return createFileInfo(info)
86+
}
87+
}

swift-android-ci-except-release.patch

Lines changed: 0 additions & 87 deletions
Original file line numberDiff line numberDiff line change
@@ -1,90 +1,3 @@
1-
diff --git a/swift-build/Sources/SWBUtil/FSProxy.swift b/swift-build/Sources/SWBUtil/FSProxy.swift
2-
index b446d21..f88f3c3 100644
3-
--- a/swift-build/Sources/SWBUtil/FSProxy.swift
4-
+++ b/swift-build/Sources/SWBUtil/FSProxy.swift
5-
@@ -49,7 +49,7 @@ public struct FileInfo: Equatable, Sendable {
6-
#if os(Windows)
7-
return (statBuf.st_mode & UInt16(ucrt.S_IFREG)) != 0
8-
#else
9-
- return (statBuf.st_mode & S_IFREG) != 0
10-
+ return (mode_t(statBuf.st_mode) & S_IFREG) != 0
11-
#endif
12-
}
13-
14-
@@ -57,7 +57,7 @@ public struct FileInfo: Equatable, Sendable {
15-
#if os(Windows)
16-
return (statBuf.st_mode & UInt16(ucrt.S_IFDIR)) != 0
17-
#else
18-
- return (statBuf.st_mode & S_IFDIR) != 0
19-
+ return (mode_t(statBuf.st_mode) & S_IFDIR) != 0
20-
#endif
21-
}
22-
23-
@@ -65,7 +65,7 @@ public struct FileInfo: Equatable, Sendable {
24-
#if os(Windows)
25-
return (statBuf.st_mode & UInt16(S_IFLNK)) == S_IFLNK
26-
#else
27-
- return (statBuf.st_mode & S_IFMT) == S_IFLNK
28-
+ return (mode_t(statBuf.st_mode) & S_IFMT) == S_IFLNK
29-
#endif
30-
}
31-
32-
@@ -75,7 +75,7 @@ public struct FileInfo: Equatable, Sendable {
33-
// Don't use FileManager.isExecutableFile due to https://github.com/swiftlang/swift-foundation/issues/860
34-
return (statBuf.st_mode & UInt16(_S_IEXEC)) != 0
35-
#else
36-
- return (statBuf.st_mode & S_IXUSR) != 0
37-
+ return (mode_t(statBuf.st_mode) & S_IXUSR) != 0
38-
#endif
39-
}
40-
41-
@@ -1395,9 +1395,9 @@ public class PseudoFS: FSProxy, @unchecked Sendable {
42-
#else
43-
info.st_mtimespec = timespec(tv_sec: time_t(node.timestamp), tv_nsec: 0)
44-
#endif
45-
- info.st_size = off_t(contents.bytes.count)
46-
- info.st_dev = node.device
47-
- info.st_ino = node.inode
48-
+ info.st_size = numericCast(contents.bytes.count)
49-
+ info.st_dev = numericCast(node.device)
50-
+ info.st_ino = numericCast(node.inode)
51-
return createFileInfo(info)
52-
case .directory(let dir):
53-
var info = stat()
54-
@@ -1405,12 +1405,12 @@ public class PseudoFS: FSProxy, @unchecked Sendable {
55-
info.st_mode = UInt16(ucrt.S_IFDIR)
56-
info.st_mtimespec = timespec(tv_sec: Int64(node.timestamp), tv_nsec: 0)
57-
#else
58-
- info.st_mode = S_IFDIR
59-
+ info.st_mode = numericCast(S_IFDIR)
60-
info.st_mtimespec = timespec(tv_sec: time_t(node.timestamp), tv_nsec: 0)
61-
#endif
62-
- info.st_size = off_t(dir.contents.count)
63-
- info.st_dev = node.device
64-
- info.st_ino = node.inode
65-
+ info.st_size = numericCast(dir.contents.count)
66-
+ info.st_dev = numericCast(node.device)
67-
+ info.st_ino = numericCast(node.inode)
68-
return createFileInfo(info)
69-
case .symlink(_):
70-
var info = stat()
71-
@@ -1418,12 +1418,12 @@ public class PseudoFS: FSProxy, @unchecked Sendable {
72-
info.st_mode = UInt16(S_IFLNK)
73-
info.st_mtimespec = timespec(tv_sec: Int64(node.timestamp), tv_nsec: 0)
74-
#else
75-
- info.st_mode = S_IFLNK
76-
+ info.st_mode = numericCast(S_IFLNK)
77-
info.st_mtimespec = timespec(tv_sec: time_t(node.timestamp), tv_nsec: 0)
78-
#endif
79-
- info.st_size = off_t(0)
80-
- info.st_dev = node.device
81-
- info.st_ino = node.inode
82-
+ info.st_size = numericCast(0)
83-
+ info.st_dev = numericCast(node.device)
84-
+ info.st_ino = numericCast(node.inode)
85-
return createFileInfo(info)
86-
}
87-
}
881
diff --git a/swift-build/Sources/SWBUtil/Lock.swift b/swift-build/Sources/SWBUtil/Lock.swift
892
index 2135ce6..fbff6f6 100644
903
--- a/swift-build/Sources/SWBUtil/Lock.swift

0 commit comments

Comments
 (0)