Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Adjust Ubuntu related patches to build 5.7.1 #149

Draft
wants to merge 10 commits into
base: main
Choose a base branch
from
2 changes: 1 addition & 1 deletion platforms/Linux/DEB/Shared/versions.sh
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ debversion=5.7.1

swift_version=5.7.1-RELEASE
icu_version=65-1
yams_version=4.0.2
yams_version=5.0.1
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks to be the version used by 5.7.1?

swift_argument_parser_version=1.0.3
swift_crypto_version=1.1.5
ninja_version=1.10.2
Expand Down
6 changes: 3 additions & 3 deletions platforms/Linux/DEB/Ubuntu/focal/debian/changelog
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
swiftlang (5.6.0-1) focal; urgency=medium
swiftlang (5.7.1-1) focal; urgency=medium

* Debian packaging introduction for Swift 5.6.
* Debian packaging updated for Swift 5.7.1.

-- Julien Blache <jblache@apple.com> Tue, 15 Mar 2022 16:36:34 -0700
-- Matias Piipari <matias.piipari@gmail.com> Tue, 6 Dec 2022 15:53:00 +000
Original file line number Diff line number Diff line change
Expand Up @@ -3,16 +3,28 @@ Description: Make target installation directory a command line option
time on the command line.
Author: Julien Blache <[email protected]>

Index: swiftlang-5.6.3/swift/utils/build-presets.ini
Index: swiftlang-5.7.1/swift/utils/build-presets.ini
===================================================================
--- swiftlang-5.6.3.orig/swift/utils/build-presets.ini
+++ swiftlang-5.6.3/swift/utils/build-presets.ini
@@ -831,7 +831,7 @@ install-swiftpm
--- swiftlang-5.7.1.orig/swift/utils/build-presets.ini
+++ swiftlang-5.7.1/swift/utils/build-presets.ini
@@ -824,7 +824,9 @@ install-swiftpm
install-swift-driver
install-xctest
install-libicu
-install-prefix=/usr
+install-prefix=%(install_prefix)s
install-libcxx
+skip-early-swift-driver
+skip-build-benchmarks
+skip-test-toolchain-benchmarks
install-sourcekit-lsp
install-swiftdocc
build-swift-static-stdlib
@@ -837,7 +840,6 @@ build-swift-stdlib-unittest-extra
test-installable-package

# Build the benchmarks against the toolchain.
-toolchain-benchmarks

# Path to the root of the installation filesystem.
install-destdir=%(install_destdir)s

Original file line number Diff line number Diff line change
Expand Up @@ -3,11 +3,11 @@ Description: Fix toolchain path for build-script-helper.py
assumption that /usr is used.
Author: Julien Blache <[email protected]>

Index: swiftlang-5.6.3/swift/benchmark/scripts/build_script_helper.py
Index: swiftlang-5.7.1/swift/benchmark/scripts/build_script_helper.py
===================================================================
--- swiftlang-5.6.3.orig/swift/benchmark/scripts/build_script_helper.py
+++ swiftlang-5.6.3/swift/benchmark/scripts/build_script_helper.py
@@ -53,7 +53,7 @@ def main():
--- swiftlang-5.7.1.orig/swift/benchmark/scripts/build_script_helper.py
+++ swiftlang-5.7.1/swift/benchmark/scripts/build_script_helper.py
@@ -51,7 +51,7 @@ def main():
if not os.path.isdir(bin_dir):
os.makedirs(bin_dir)

Expand All @@ -16,21 +16,19 @@ Index: swiftlang-5.6.3/swift/benchmark/scripts/build_script_helper.py
perform_build(args, swiftbuild_path, "debug", "Benchmark_Onone", "-Onone")
perform_build(args, swiftbuild_path, "release", "Benchmark_Osize", "-Osize")
perform_build(args, swiftbuild_path, "release", "Benchmark_O", "-O")
Index: swiftlang-5.6.3/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py
Index: swiftlang-5.7.1/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py
===================================================================
--- swiftlang-5.6.3.orig/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py
+++ swiftlang-5.6.3/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py
@@ -100,13 +100,17 @@ class Benchmarks(product.Product):
--- swiftlang-5.7.1.orig/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py
+++ swiftlang-5.7.1/swift/utils/swift_build_support/swift_build_support/products/benchmarks.py
@@ -100,11 +100,17 @@ class Benchmarks(product.Product):


def _get_toolchain_path(host_target, product, args):
- # TODO check if we should prefer using product.install_toolchain_path
# this logic initially was inside run_build_script_helper
# and was factored out so it can be used in testing as well

- toolchain_path = swiftpm.SwiftPM.get_install_destdir(args,
- host_target,
- product.build_dir)
- toolchain_path = product.host_install_destdir(host_target)
+ install_destdir = args.install_destdir
+ if swiftpm.SwiftPM.has_cross_compile_hosts(args):
+ install_destdir = swiftpm.SwiftPM.get_install_destdir(args,
Expand Down