Skip to content

Commit c48be33

Browse files
committed
Avoid merge conflicts by turning a sourcekit-lsp patch on the CI into a regex replacement instead
1 parent 1944d48 commit c48be33

File tree

3 files changed

+1
-24
lines changed

3 files changed

+1
-24
lines changed

.github/workflows/sdks.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -141,6 +141,7 @@ jobs:
141141
fi
142142
143143
perl -pi -e 's%String\(cString: getpass%\"fake\" //%' swiftpm/Sources/PackageRegistryCommand/PackageRegistryCommand+Auth.swift
144+
perl -pi -e "s%swift/android',%swift/android', '-Xlinker', '-landroid-spawn',%" sourcekit-lsp/Utilities/build-script-helper.py
144145
VERSION="$(echo ${{ steps.version.outputs.tag }} | cut -f1,2 -d-)-${{ matrix.version }}"
145146
146147
# e.g. swift-6.1-release-android-24-sdk

swift-android-ci-except-release.patch

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
diff --git a/sourcekit-lsp/Utilities/build-script-helper.py b/sourcekit-lsp/Utilities/build-script-helper.py
2-
index d264f10c..7c69168e 100755
3-
--- a/sourcekit-lsp/Utilities/build-script-helper.py
4-
+++ b/sourcekit-lsp/Utilities/build-script-helper.py
5-
@@ -136,6 +136,7 @@ def get_swiftpm_options(swift_exec: str, args: argparse.Namespace, suppress_verb
6-
if '-android' in build_target:
7-
swiftpm_args += [
8-
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android',
9-
+ '-Xlinker', '-landroid-spawn',
10-
]
11-
elif not build_os.startswith('macosx'):
12-
# Library rpath for swift, dispatch, Foundation, etc. when installing
131
diff --git a/swift-build/Sources/SWBUtil/FSProxy.swift b/swift-build/Sources/SWBUtil/FSProxy.swift
142
index b446d21..f88f3c3 100644
153
--- a/swift-build/Sources/SWBUtil/FSProxy.swift

swift-android-ci-release.patch

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,3 @@
1-
diff --git a/sourcekit-lsp/Utilities/build-script-helper.py b/sourcekit-lsp/Utilities/build-script-helper.py
2-
index bd31bec..4469cab 100755
3-
--- a/sourcekit-lsp/Utilities/build-script-helper.py
4-
+++ b/sourcekit-lsp/Utilities/build-script-helper.py
5-
@@ -129,6 +129,7 @@ def get_swiftpm_options(swift_exec: str, args: argparse.Namespace) -> List[str]:
6-
swiftpm_args += [
7-
'-Xlinker', '-rpath', '-Xlinker', '$ORIGIN/../lib/swift/android',
8-
# SwiftPM will otherwise try to compile against GNU strerror_r on
9-
+ '-Xlinker', '-landroid-spawn',
10-
# Android and fail.
11-
'-Xswiftc', '-Xcc', '-Xswiftc', '-U_GNU_SOURCE',
12-
]
131
diff --git a/swift-system/Sources/System/Internals/CInterop.swift b/swift-system/Sources/System/Internals/CInterop.swift
142
index 13abc75..2ad551a 100644
153
--- a/swift-system/Sources/System/Internals/CInterop.swift

0 commit comments

Comments
 (0)