swift_lang, disable recipe, build is broken, current package can't be installed (#8837)

This commit is contained in:
Schrijvers Luc
2023-06-22 12:59:21 +02:00
committed by GitHub
parent 6d8cee8fba
commit bb381aba0c
2 changed files with 148 additions and 7 deletions

View File

@@ -1,4 +1,4 @@
From d41dc9086b655f737a1b3fb58e9fb10758b7ab84 Mon Sep 17 00:00:00 2001
From a41f7bcb6b5e11da2e3b7d3131ee24d3c0d0da05 Mon Sep 17 00:00:00 2001
From: Hugh Bellamy <hughbellars@gmail.com>
Date: Tue, 21 Mar 2017 18:54:39 +0700
Subject: Fix top of tree Clang compilation errors
@@ -53,5 +53,146 @@ index 8b265a7..4f0a2fb 100644
SILBuilderWithScope B(Inst);
auto *MI = B.createMetatype(FoundIERI->getLoc(), SILMetaTy);
--
2.14.2
2.37.3
From 919060305005078d0c8b0d12c711bf158595c2be Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 9 Jun 2023 19:36:08 +0200
Subject: Fix identations
diff --git a/utils/build-script b/utils/build-script
index e632aed..4bf87f9 100644
--- a/utils/build-script
+++ b/utils/build-script
@@ -327,7 +327,7 @@ class BuildScriptInvocation(object):
if args.skip_build:
args.skip_build_linux = True
args.skip_build_freebsd = True
- args.skip_build_haiku = True
+ args.skip_build_haiku = True
args.skip_build_cygwin = True
args.skip_build_osx = True
args.skip_build_ios = True
@@ -374,7 +374,7 @@ class BuildScriptInvocation(object):
if not args.test and not args.validation_test and not args.long_test:
args.skip_test_linux = True
args.skip_test_freebsd = True
- args.skip_test_haiku = True
+ args.skip_test_haiku = True
args.skip_test_cygwin = True
args.skip_test_osx = True
args.skip_test_ios = True
@@ -461,7 +461,7 @@ class BuildScriptInvocation(object):
self.platforms_to_skip_build.add(StdlibDeploymentTarget.Linux)
if args.skip_build_freebsd:
self.platforms_to_skip_build.add(StdlibDeploymentTarget.FreeBSD)
- if args.skip_build_haiku:
+ if args.skip_build_haiku:
self.platforms_to_skip_build.add(StdlibDeploymentTarget.Haiku)
if args.skip_build_cygwin:
self.platforms_to_skip_build.add(StdlibDeploymentTarget.Cygwin)
@@ -490,7 +490,7 @@ class BuildScriptInvocation(object):
self.platforms_to_skip_test.add(StdlibDeploymentTarget.Linux)
if args.skip_test_freebsd:
self.platforms_to_skip_test.add(StdlibDeploymentTarget.FreeBSD)
- if args.skip_test_haiku:
+ if args.skip_test_haiku:
self.platforms_to_skip_test.add(StdlibDeploymentTarget.Haiku)
if args.skip_test_cygwin:
self.platforms_to_skip_test.add(StdlibDeploymentTarget.Cygwin)
@@ -699,7 +699,7 @@ class BuildScriptInvocation(object):
impl_args += ["--skip-build-linux"]
if args.skip_build_freebsd:
impl_args += ["--skip-build-freebsd"]
- if args.skip_build_haiku:
+ if args.skip_build_haiku:
impl_args += ["--skip-build-haiku"]
if args.skip_build_cygwin:
impl_args += ["--skip-build-cygwin"]
@@ -737,7 +737,7 @@ class BuildScriptInvocation(object):
impl_args += ["--skip-test-linux"]
if args.skip_test_freebsd:
impl_args += ["--skip-test-freebsd"]
- if args.skip_test_haiku:
+ if args.skip_test_haiku:
impl_args += ["--skip-test-haiku"]
if args.skip_test_cygwin:
impl_args += ["--skip-test-cygwin"]
diff --git a/utils/swift_build_support/swift_build_support/toolchain.py b/utils/swift_build_support/swift_build_support/toolchain.py
index 1c9a92b..1ac5497 100644
--- a/utils/swift_build_support/swift_build_support/toolchain.py
+++ b/utils/swift_build_support/swift_build_support/toolchain.py
@@ -168,27 +168,27 @@ class Cygwin(Linux):
class Haiku(GenericUnix):
def __init__(self):
- # For testing toolchain initializer on non-FreeBSD systems
- sys = platform.system()
- if sys == 'Haiku':
- suffixes = ['']
- # See: https://github.com/apple/swift/pull/169
- # Building Swift from source requires a recent version of the Clang
- # compiler with C++14 support.
- super(Haiku, self).__init__(suffixes)
+ # For testing toolchain initializer on non-FreeBSD systems
+ sys = platform.system()
+ if sys == 'Haiku':
+ suffixes = ['']
+ # See: https://github.com/apple/swift/pull/169
+ # Building Swift from source requires a recent version of the Clang
+ # compiler with C++14 support.
+ super(Haiku, self).__init__(suffixes)
@cache_util.reify
def _release_date(self):
- """Return the release date for Haiku operating system on this host.
- If the release date cannot be ascertained, return None.
- """
- # For details on `sysctl`, see:
- # http://www.freebsd.org/cgi/man.cgi?sysctl(8)
- #out = shell.capture(['sysctl', '-n', 'kern.osreldate'],
- # dry_run=False, echo=False, optional=True)
- if out is None:
- return None
- return int(out)
+ """Return the release date for Haiku operating system on this host.
+ If the release date cannot be ascertained, return None.
+ """
+ # For details on `sysctl`, see:
+ # http://www.freebsd.org/cgi/man.cgi?sysctl(8)
+ #out = shell.capture(['sysctl', '-n', 'kern.osreldate'],
+ # dry_run=False, echo=False, optional=True)
+ if out is None:
+ return None
+ return int(out)
def host_toolchain(**kwargs):
--
2.37.3
From b37bbc1b289949dbad7fee2616e2fd8197c9ad88 Mon Sep 17 00:00:00 2001
From: begasus <begasus@gmail.com>
Date: Fri, 9 Jun 2023 19:38:35 +0200
Subject: Switch to python3.9
diff --git a/utils/build-script-impl b/utils/build-script-impl
index 3d7ba14..07caa89 100644
--- a/utils/build-script-impl
+++ b/utils/build-script-impl
@@ -1039,7 +1039,7 @@ function make_relative_symlink() {
local SOURCE=$1
local TARGET=$2
local TARGET_DIR=$(dirname $2)
- local RELATIVE_SOURCE=$(python -c "import os.path; print(os.path.relpath(\"${SOURCE}\", \"${TARGET_DIR}\"))")
+ local RELATIVE_SOURCE=$(python3 -c "import os.path; print(os.path.relpath(\"${SOURCE}\", \"${TARGET_DIR}\"))")
call ln -sf "${RELATIVE_SOURCE}" "${TARGET}"
}
--
2.37.3

View File

@@ -9,7 +9,7 @@ easier for the developer."
HOMEPAGE="https://swift.org"
COPYRIGHT="2017 Apple Inc"
LICENSE="Apache v2"
REVISION="3"
REVISION="4"
srcGitRev="94e444f22015d32b81e6dc1a0316a8243360559b"
SOURCE_URI="https://github.com/return/swift/archive/$srcGitRev.zip"
CHECKSUM_SHA256="e0d3e048e57ee0fc85b41392d5d075dc037ce5c03f13e41f15bd45d647322155"
@@ -32,7 +32,7 @@ CHECKSUM_SHA256_5="58b0aa642cf15b99d889b923c7624cb7c092facb86a5329449efa42a6443f
SOURCE_DIR_5="swift-compiler-rt-$srcGitRev_5"
PATCHES="swift_lang-3.1.patchset"
ARCHITECTURES="all !x86_gcc2 !x86"
ARCHITECTURES="?all !x86_gcc2"
SECONDARY_ARCHITECTURES="!x86"
PROVIDES="
@@ -99,7 +99,7 @@ BUILD_PREREQUIRES="
cmd:libtool$secondaryArchSuffix
cmd:make
cmd:pkg_config$secondaryArchSuffix
cmd:python2
cmd:python3
cmd:sed
cmd:swig
cmd:which
@@ -127,7 +127,7 @@ BUILD()
export HOST_CXX="/bin/clang++"
# Build faster by building only for X86
python2 ./swift/utils/build-script -R -m \
python3 ./swift/utils/build-script -R -m \
--extra-cmake-options='-DLLVM_ENABLE_ASSERTIONS=TRUE \
-DCMAKE_SKIP_RPATH=FALSE -DLLVM_ENABLE_RTTI=ON \
-DLLVM_TARGETS_TO_BUILD=X86 -DLLVM_ENABLE_THREADS=YES \
@@ -174,5 +174,5 @@ INSTALL()
TEST()
{
python2 utils/build-script -R -t
python3 utils/build-script -R -t
}