Skip to content

Commit e76bd58

Browse files
committed
Install the native host LLVM tools for full compiler builds
1 parent 3c95bf0 commit e76bd58

File tree

3 files changed

+3
-36
lines changed

3 files changed

+3
-36
lines changed

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

Lines changed: 0 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,3 @@
1-
diff --git a/swift/utils/swift_build_support/swift_build_support/cmake.py b/swift/utils/swift_build_support/swift_build_support/cmake.py
2-
index bfb69965890..b5e9f5349c2 100644
3-
--- a/swift/utils/swift_build_support/swift_build_support/cmake.py
4-
+++ b/swift/utils/swift_build_support/swift_build_support/cmake.py
5-
@@ -153,10 +153,8 @@ class CMake(object):
6-
toolchain_path = product.native_toolchain_path(args.host_target)
7-
cmake_swiftc_path = os.getenv('CMAKE_Swift_COMPILER',
8-
os.path.join(toolchain_path, 'bin', 'swiftc'))
9-
- define("CMAKE_C_COMPILER:PATH", os.path.join(toolchain_path,
10-
- 'bin', 'clang'))
11-
- define("CMAKE_CXX_COMPILER:PATH", os.path.join(toolchain_path,
12-
- 'bin', 'clang++'))
13-
+ define("CMAKE_C_COMPILER:PATH", toolchain.cc)
14-
+ define("CMAKE_CXX_COMPILER:PATH", toolchain.cxx)
15-
define("CMAKE_Swift_COMPILER:PATH", cmake_swiftc_path)
16-
else:
17-
cmake_swiftc_path = os.getenv('CMAKE_Swift_COMPILER', toolchain.swiftc)
181
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
192
index 47e7ab79905..d88c3c242ad 100644
203
--- a/swift/utils/swift_build_support/swift_build_support/products/product.py

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

Lines changed: 0 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,3 @@ index 3f36fc979cb..8713ae8fea8 100755
1010
"grep",
1111
"--extended-regexp",
1212
"--recursive",
13-
diff --git a/swift/utils/swift_build_support/swift_build_support/cmake.py b/swift/utils/swift_build_support/swift_build_support/cmake.py
14-
index 9a0f5b43e2d..5c7d1320a2d 100644
15-
--- a/swift/utils/swift_build_support/swift_build_support/cmake.py
16-
+++ b/swift/utils/swift_build_support/swift_build_support/cmake.py
17-
@@ -150,11 +150,8 @@ class CMake(object):
18-
define("CMAKE_CXX_COMPILER_LAUNCHER:PATH", args.cmake_cxx_launcher)
19-
20-
if self.prefer_native_toolchain and product:
21-
- clang_tools_path = product.native_clang_tools_path(args.host_target)
22-
- define("CMAKE_C_COMPILER:PATH", os.path.join(clang_tools_path,
23-
- 'bin', 'clang'))
24-
- define("CMAKE_CXX_COMPILER:PATH", os.path.join(clang_tools_path,
25-
- 'bin', 'clang++'))
26-
+ define("CMAKE_C_COMPILER:PATH", toolchain.cc)
27-
+ define("CMAKE_CXX_COMPILER:PATH", toolchain.cxx)
28-
29-
toolchain_path = product.native_toolchain_path(args.host_target)
30-
cmake_swiftc_path = os.getenv('CMAKE_Swift_COMPILER',

swift-ci/sdks/android/scripts/build.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -411,6 +411,7 @@ for arch in $archs; do
411411
build_cmark=""
412412
local_build=""
413413
build_llvm="1"
414+
install_llvm="--install-llvm"
414415
build_swift_tools="1"
415416
validation_test="1"
416417
native_swift_tools_path=""
@@ -420,6 +421,7 @@ for arch in $archs; do
420421
build_cmark="--skip-build-cmark"
421422
local_build="--skip-local-build"
422423
build_llvm="0"
424+
install_llvm=""
423425
build_swift_tools="0"
424426
validation_test="0"
425427
native_swift_tools_path="--native-swift-tools-path=$host_toolchain/bin"
@@ -442,7 +444,7 @@ for arch in $archs; do
442444
--cross-compile-hosts=android-$arch \
443445
--cross-compile-deps-path=$sdk_root \
444446
--install-destdir=$sdk_root \
445-
--build-llvm=$build_llvm \
447+
--build-llvm=$build_llvm ${install_llvm} \
446448
--build-swift-tools=$build_swift_tools \
447449
${native_swift_tools_path} \
448450
${native_clang_tools_path} \

0 commit comments

Comments
 (0)