termux-packages/packages/swift/swift-build-script.patch

53 lines
2.2 KiB
Diff
Raw Normal View History

diff --git a/swift/utils/build-script b/swift/utils/build-script
index b1d060328bc..218c9215260 100755
--- a/swift/utils/build-script
+++ b/swift/utils/build-script
@@ -799,8 +807,9 @@
self._execute_merged_host_lipo_core_action()
# Non-build-script-impl products...
- # Note: currently only supports building for the host.
- for host_target in [self.args.host_target]:
+ for host_target in all_host_names:
+ if self.args.skip_local_build and host_target == self.args.host_target:
+ continue
for product_class in product_classes:
if product_class.is_build_script_impl_product():
continue
2020-09-07 18:23:03 +02:00
diff --git a/swift/utils/gen-static-stdlib-link-args b/swift/utils/gen-static-stdlib-link-args
index 0fa009d67d3..abd98c2493f 100755
--- a/swift/utils/gen-static-stdlib-link-args
+++ b/swift/utils/gen-static-stdlib-link-args
@@ -60,9 +60,8 @@ function write_linkfile {
fi
cat >$OUTPUTFILE <<EOF
-ldl
--lpthread
-lswiftCore
--lswiftImageInspectionShared
+-llog
$ICU_LIBS
-lstdc++
-lm
diff --git a/swift/utils/swift_build_support/swift_build_support/products/swiftpm.py b/swift/utils/swift_build_support/swift_build_support/products/swiftpm.py
index 475483618f1..2bea230012b 100644
--- a/swift/utils/swift_build_support/swift_build_support/products/swiftpm.py
+++ b/swift/utils/swift_build_support/swift_build_support/products/swiftpm.py
@@ -56,6 +56,7 @@ class SwiftPM(product.Product):
# Pass Cross compile host info
if self.has_cross_compile_hosts(self.args):
+ helper_cmd += ['--skip-cmake-bootstrap']
helper_cmd += ['--cross-compile-hosts']
for cross_compile_host in self.args.cross_compile_hosts:
helper_cmd += [cross_compile_host]
2020-09-07 18:23:03 +02:00
@@ -83,7 +86,7 @@ class SwiftPM(product.Product):
@classmethod
def get_install_destdir(self, args, host_target, build_dir):
install_destdir = args.install_destdir
- if self.has_cross_compile_hosts(args):
+ if False:
2020-09-07 18:23:03 +02:00
build_root = os.path.dirname(build_dir)
install_destdir = '%s/intermediate-install/%s' % (build_root, host_target)
return install_destdir