Skip to content

Commit 88b924c

Browse files
committed
Update patches for upstream build-script pull
1 parent 1084299 commit 88b924c

File tree

3 files changed

+35
-17
lines changed

3 files changed

+35
-17
lines changed

swift-ci/sdks/android/patches/swift-android-devel.patch

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,3 +118,20 @@ index f7f2664b2de..01d36e127c6 100644
118118

119119
// CHECK-DISABLED-NOT: normal_count
120120

121+
diff --git a/swift/utils/swift_build_support/swift_build_support/cmake.py b/swift/utils/swift_build_support/swift_build_support/cmake.py
122+
index bfb69965890..b5e9f5349c2 100644
123+
--- a/swift/utils/swift_build_support/swift_build_support/cmake.py
124+
+++ b/swift/utils/swift_build_support/swift_build_support/cmake.py
125+
@@ -153,10 +153,8 @@ class CMake(object):
126+
toolchain_path = product.native_toolchain_path(args.host_target)
127+
cmake_swiftc_path = os.getenv('CMAKE_Swift_COMPILER',
128+
os.path.join(toolchain_path, 'bin', 'swiftc'))
129+
- define("CMAKE_C_COMPILER:PATH", os.path.join(toolchain_path,
130+
- 'bin', 'clang'))
131+
- define("CMAKE_CXX_COMPILER:PATH", os.path.join(toolchain_path,
132+
- 'bin', 'clang++'))
133+
+ define("CMAKE_C_COMPILER:PATH", toolchain.cc)
134+
+ define("CMAKE_CXX_COMPILER:PATH", toolchain.cxx)
135+
define("CMAKE_Swift_COMPILER:PATH", cmake_swiftc_path)
136+
else:
137+
cmake_swiftc_path = os.getenv('CMAKE_Swift_COMPILER', toolchain.swiftc)

swift-ci/sdks/android/patches/swift-android-trunk-libdispatch.patch

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,6 +34,24 @@ index e0a3b4465a3..c01af893eda 100644
3434

3535
// RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -enable-anonymous-context-mangled-names %S/Inputs/ConcreteTypes.swift %S/Inputs/GenericTypes.swift %S/Inputs/Protocols.swift %S/Inputs/Extensions.swift %S/Inputs/Closures.swift -parse-as-library -emit-module -emit-library %no-fixup-chains -module-name TypesToReflect -o %t/%target-library-name(TypesToReflect)
3636
// RUN: %target-build-swift -target %target-swift-5.2-abi-triple -Xfrontend -enable-anonymous-context-mangled-names %S/Inputs/ConcreteTypes.swift %S/Inputs/GenericTypes.swift %S/Inputs/Protocols.swift %S/Inputs/Extensions.swift %S/Inputs/Closures.swift %S/Inputs/main.swift -emit-module -emit-executable %no-fixup-chains -module-name TypesToReflect -o %t/TypesToReflect
37+
diff --git a/swift/utils/swift_build_support/swift_build_support/cmake.py b/swift/utils/swift_build_support/swift_build_support/cmake.py
38+
index 9a0f5b43e2d..5c7d1320a2d 100644
39+
--- a/swift/utils/swift_build_support/swift_build_support/cmake.py
40+
+++ b/swift/utils/swift_build_support/swift_build_support/cmake.py
41+
@@ -150,11 +150,8 @@ class CMake(object):
42+
define("CMAKE_CXX_COMPILER_LAUNCHER:PATH", args.cmake_cxx_launcher)
43+
44+
if self.prefer_native_toolchain and product:
45+
- clang_tools_path = product.native_clang_tools_path(args.host_target)
46+
- define("CMAKE_C_COMPILER:PATH", os.path.join(clang_tools_path,
47+
- 'bin', 'clang'))
48+
- define("CMAKE_CXX_COMPILER:PATH", os.path.join(clang_tools_path,
49+
- 'bin', 'clang++'))
50+
+ define("CMAKE_C_COMPILER:PATH", toolchain.cc)
51+
+ define("CMAKE_CXX_COMPILER:PATH", toolchain.cxx)
52+
53+
toolchain_path = product.native_toolchain_path(args.host_target)
54+
cmake_swiftc_path = os.getenv('CMAKE_Swift_COMPILER',
3755
diff --git a/swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake b/swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake
3856
index 3da519e..e2dd8ed 100644
3957
--- a/swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake

swift-ci/sdks/android/patches/swift-android.patch

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -34,23 +34,6 @@ index 16e05052609..7ab8cebfab8 100755
3434

3535
cmake_options=(
3636
-DENABLE_SWIFT=YES
37-
diff --git a/swift/utils/swift_build_support/swift_build_support/cmake.py b/swift/utils/swift_build_support/swift_build_support/cmake.py
38-
index bfb69965890..b5e9f5349c2 100644
39-
--- a/swift/utils/swift_build_support/swift_build_support/cmake.py
40-
+++ b/swift/utils/swift_build_support/swift_build_support/cmake.py
41-
@@ -153,10 +153,8 @@ class CMake(object):
42-
toolchain_path = product.native_toolchain_path(args.host_target)
43-
cmake_swiftc_path = os.getenv('CMAKE_Swift_COMPILER',
44-
os.path.join(toolchain_path, 'bin', 'swiftc'))
45-
- define("CMAKE_C_COMPILER:PATH", os.path.join(toolchain_path,
46-
- 'bin', 'clang'))
47-
- define("CMAKE_CXX_COMPILER:PATH", os.path.join(toolchain_path,
48-
- 'bin', 'clang++'))
49-
+ define("CMAKE_C_COMPILER:PATH", toolchain.cc)
50-
+ define("CMAKE_CXX_COMPILER:PATH", toolchain.cxx)
51-
define("CMAKE_Swift_COMPILER:PATH", cmake_swiftc_path)
52-
else:
53-
cmake_swiftc_path = os.getenv('CMAKE_Swift_COMPILER', toolchain.swiftc)
5437
diff --git a/swift/utils/swift_build_support/swift_build_support/products/product.py b/swift/utils/swift_build_support/swift_build_support/products/product.py
5538
index 274b6037305..bf0f7fcf671 100644
5639
--- a/swift/utils/swift_build_support/swift_build_support/products/product.py

0 commit comments

Comments
 (0)