Skip to content

Build self-hosted trunk from last tag, after bringing back upstreamed patches #10

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions .github/workflows/pull_request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,6 @@ jobs:
fail-fast: false
matrix:
include:
- swift-version: 'swift-6.2-branch'
build-type: 'docker'
build-compiler: '1'
runner: 'self-hosted'
- swift-version: 'development'
build-type: 'docker'
build-compiler: '1'
Expand Down
14 changes: 14 additions & 0 deletions swift-ci/sdks/android/patches/swift-android-devel.patch
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,20 @@ index f7f2664b2de..01d36e127c6 100644

// CHECK-DISABLED-NOT: normal_count

diff --git a/swift/utils/build-script-impl b/swift/utils/build-script-impl
index 16e05052609..7ab8cebfab8 100755
--- a/swift/utils/build-script-impl
+++ b/swift/utils/build-script-impl
@@ -828,6 +828,9 @@ function set_build_options_for_host() {
# and it must be the same for both LLVM and Swift

if [[ "${SWIFT_HOST_TRIPLE}" ]] ; then
+ SWIFT_TARGET_CMAKE_OPTIONS+=(
+ -DCMAKE_Swift_COMPILER_TARGET:STRING="${SWIFT_HOST_TRIPLE}"
+ )
llvm_cmake_options+=(
-DLLVM_HOST_TRIPLE:STRING="${SWIFT_HOST_TRIPLE}"
)
diff --git a/swift/utils/swift_build_support/swift_build_support/cmake.py b/swift/utils/swift_build_support/swift_build_support/cmake.py
index bfb69965890..b5e9f5349c2 100644
--- a/swift/utils/swift_build_support/swift_build_support/cmake.py
Expand Down
27 changes: 12 additions & 15 deletions swift-ci/sdks/android/patches/swift-android-trunk-libdispatch.patch
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
diff --git a/swift/test/IRGen/availability_custom_domains_clang.swift b/swift/test/IRGen/availability_custom_domains_clang.swift
index c0a79478b18..2a94211da21 100644
--- a/swift/test/IRGen/availability_custom_domains_clang.swift
+++ b/swift/test/IRGen/availability_custom_domains_clang.swift
@@ -9,6 +9,7 @@
// RUN: -O | %FileCheck %s --check-prefixes=CHECK,CHECK-O

// REQUIRES: swift_feature_CustomAvailability
+// XFAIL: OS=linux-android, OS=linux-androideabi

// CHECK-LABEL: define {{.*}}swiftcc void @"$s4Test24ifAvailableEnabledDomainyyF"()
// CHECK: call void @available_in_enabled_domain()
diff --git a/swift/test/Misc/verify-swift-feature-testing.test-sh b/swift/test/Misc/verify-swift-feature-testing.test-sh
index 3f36fc979cb..8713ae8fea8 100755
--- a/swift/test/Misc/verify-swift-feature-testing.test-sh
Expand Down Expand Up @@ -28,21 +40,6 @@ index 9a0f5b43e2d..5c7d1320a2d 100644

toolchain_path = product.native_toolchain_path(args.host_target)
cmake_swiftc_path = os.getenv('CMAKE_Swift_COMPILER',
diff --git a/swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake b/swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake
index 3da519e..e2dd8ed 100644
--- a/swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake
+++ b/swift-corelibs-libdispatch/cmake/modules/SwiftSupport.cmake
@@ -4,6 +4,10 @@ if(NOT dispatch_MODULE_TRIPLE)
set(module_triple_command "${CMAKE_Swift_COMPILER}" -print-target-info)
if(CMAKE_Swift_COMPILER_TARGET)
list(APPEND module_triple_command -target ${CMAKE_Swift_COMPILER_TARGET})
+ else()
+ set(arg_list ${CMAKE_Swift_FLAGS})
+ separate_arguments(arg_list)
+ list(APPEND module_triple_command ${arg_list})
endif()
execute_process(COMMAND ${module_triple_command} OUTPUT_VARIABLE target_info_json)

diff --git a/swift-corelibs-libdispatch/src/swift/CMakeLists.txt b/swift-corelibs-libdispatch/src/swift/CMakeLists.txt
index 38bef37..d0ddf98 100644
--- a/swift-corelibs-libdispatch/src/swift/CMakeLists.txt
Expand Down
80 changes: 5 additions & 75 deletions swift-ci/sdks/android/patches/swift-android.patch
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,6 @@ index 01390761c8c..d84c142397c 100644

// NOTE: 25185.byteSwapped = 0x62 'a', 0x61 'b'
// CHECK-LABEL: test_ascii_scalar_scalar2
diff --git a/swift/test/SILOptimizer/semantic-arc-opts-redundantcopyopts.sil b/swift/test/SILOptimizer/semantic-arc-opts-redundantcopyopts.sil
index 98765e0e4a3..4dc68bf522b 100644
--- a/swift/test/SILOptimizer/semantic-arc-opts-redundantcopyopts.sil
+++ b/swift/test/SILOptimizer/semantic-arc-opts-redundantcopyopts.sil
@@ -1,5 +1,7 @@
// RUN: %target-sil-opt -module-name Swift -enable-sil-verify-all -semantic-arc-opts -sil-semantic-arc-peepholes-redundant-copyvalue-elim %s | %FileCheck %s

+// XFAIL: OS=linux-android, OS=linux-androideabi
+
// NOTE: Some of our tests here depend on borrow elimination /not/ running!
// Please do not add it to clean up the IR like we did in
// semanticarcopts-loadcopy-to-loadborrow!
diff --git a/swift/utils/build-script-impl b/swift/utils/build-script-impl
index 16e05052609..7ab8cebfab8 100755
--- a/swift/utils/build-script-impl
Expand All @@ -48,15 +36,16 @@ index 324d1a77eea..e88601a8701 100644

from . import cmake_product
from . import product
@@ -115,6 +117,22 @@ class SwiftTestingCMakeShim(cmake_product.CMakeProduct):
@@ -115,6 +117,24 @@ class SwiftTestingCMakeShim(cmake_product.CMakeProduct):
# FIXME: If we build macros for the builder, specify the path.
self.cmake_options.define('SwiftTesting_MACRO', 'NO')

+ if host_target.startswith('android') and self.is_cross_compile_target(host_target):
+ host_config = HostSpecificConfiguration(host_target, self.args)
+ self.cmake_options.extend(host_config.cmake_options)
+ flags = '-target %s-unknown-linux-android%s ' % (self.args.android_arch,
+ self.args.android_api_level)
+ triple = '%s-unknown-linux-android%s' % (self.args.android_arch,
+ self.args.android_api_level)
+ flags = '-target %s ' % (triple)
+
+ flags += '-resource-dir %s/lib/swift ' % (
+ self.host_install_destdir(host_target) + self.args.install_prefix)
Expand All @@ -65,6 +54,7 @@ index 324d1a77eea..e88601a8701 100644
+ flags += '-sdk %s/sysroot ' % (ndk_path)
+ flags += '-tools-directory %s/bin' % (ndk_path)
+ self.cmake_options.define('CMAKE_Swift_FLAGS', flags)
+ self.cmake_options.define('CMAKE_Swift_COMPILER_TARGET', triple)
+ self.cmake_options.define('CMAKE_CXX_COMPILER_WORKS', 'True')
+ self.cmake_options.define('CMAKE_FIND_ROOT_PATH', self.args.cross_compile_deps_path)
+
Expand All @@ -83,36 +73,6 @@ index 7f290d16..95366592 100644
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
diff --git a/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake b/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake
index 468dc61..a90ae3d 100644
--- a/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake
+++ b/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake
@@ -2,6 +2,10 @@
set(print_target_info_invocation "${CMAKE_Swift_COMPILER}" -print-target-info)
if(CMAKE_Swift_COMPILER_TARGET)
list(APPEND print_target_info_invocation -target ${CMAKE_Swift_COMPILER_TARGET})
+else()
+ set(arg_list ${CMAKE_Swift_FLAGS})
+ separate_arguments(arg_list)
+ list(APPEND print_target_info_invocation ${arg_list})
endif()
execute_process(COMMAND ${print_target_info_invocation} OUTPUT_VARIABLE target_info_json)
message(CONFIGURE_LOG "Swift Target Info: ${print_target_info_invocation}\n"
diff --git a/swift-foundation/cmake/modules/SwiftFoundationSwiftSupport.cmake b/swift-foundation/cmake/modules/SwiftFoundationSwiftSupport.cmake
index cbdfc2a..bb4121d 100644
--- a/swift-foundation/cmake/modules/SwiftFoundationSwiftSupport.cmake
+++ b/swift-foundation/cmake/modules/SwiftFoundationSwiftSupport.cmake
@@ -37,6 +37,10 @@ function(_swift_foundation_install_target module)
set(module_triple_command "${CMAKE_Swift_COMPILER}" -print-target-info)
if(CMAKE_Swift_COMPILER_TARGET)
list(APPEND module_triple_command -target ${CMAKE_Swift_COMPILER_TARGET})
+ else()
+ set(arg_list ${CMAKE_Swift_FLAGS})
+ separate_arguments(arg_list)
+ list(APPEND module_triple_command ${arg_list})
endif()
execute_process(COMMAND ${module_triple_command} OUTPUT_VARIABLE target_info_json)
string(JSON module_triple GET "${target_info_json}" "target" "moduleTriple")
diff --git a/swift-testing/CMakeLists.txt b/swift-testing/CMakeLists.txt
index 1be9a4b..bd7b1bd 100644
--- a/swift-testing/CMakeLists.txt
Expand All @@ -125,33 +85,3 @@ index 1be9a4b..bd7b1bd 100644
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
diff --git a/swift-testing/cmake/modules/PlatformInfo.cmake b/swift-testing/cmake/modules/PlatformInfo.cmake
index 94c60ef..ab8a491 100644
--- a/swift-testing/cmake/modules/PlatformInfo.cmake
+++ b/swift-testing/cmake/modules/PlatformInfo.cmake
@@ -9,6 +9,10 @@
set(print_target_info_invocation "${CMAKE_Swift_COMPILER}" -print-target-info)
if(CMAKE_Swift_COMPILER_TARGET)
list(APPEND print_target_info_invocation -target ${CMAKE_Swift_COMPILER_TARGET})
+else()
+ set(arg_list ${CMAKE_Swift_FLAGS})
+ separate_arguments(arg_list)
+ list(APPEND print_target_info_invocation ${arg_list})
endif()
execute_process(COMMAND ${print_target_info_invocation} OUTPUT_VARIABLE target_info_json)
message(CONFIGURE_LOG "Swift Target Info: ${print_target_info_invocation}\n"
diff --git a/swift-testing/cmake/modules/TargetTriple.cmake b/swift-testing/cmake/modules/TargetTriple.cmake
index e087cc4..02f3a95 100644
--- a/swift-testing/cmake/modules/TargetTriple.cmake
+++ b/swift-testing/cmake/modules/TargetTriple.cmake
@@ -10,6 +10,10 @@
set(SWT_TARGET_INFO_COMMAND "${CMAKE_Swift_COMPILER}" -print-target-info)
if(CMAKE_Swift_COMPILER_TARGET)
list(APPEND SWT_TARGET_INFO_COMMAND -target ${CMAKE_Swift_COMPILER_TARGET})
+else()
+ set(arg_list ${CMAKE_Swift_FLAGS})
+ separate_arguments(arg_list)
+ list(APPEND SWT_TARGET_INFO_COMMAND ${arg_list})
endif()
execute_process(COMMAND ${SWT_TARGET_INFO_COMMAND} OUTPUT_VARIABLE SWT_TARGET_INFO_JSON)
string(JSON SWT_TARGET_TRIPLE GET "${SWT_TARGET_INFO_JSON}" "target" "unversionedTriple")
Loading