@@ -10,18 +10,6 @@ index 01390761c8c..d84c142397c 100644
10
10
11
11
// NOTE: 25185.byteSwapped = 0x62 'a', 0x61 'b'
12
12
// CHECK-LABEL: test_ascii_scalar_scalar2
13
- diff --git a/swift/test/SILOptimizer/semantic-arc-opts-redundantcopyopts.sil b/swift/test/SILOptimizer/semantic-arc-opts-redundantcopyopts.sil
14
- index 98765e0e4a3..4dc68bf522b 100644
15
- --- a/swift/test/SILOptimizer/semantic-arc-opts-redundantcopyopts.sil
16
- +++ b/swift/test/SILOptimizer/semantic-arc-opts-redundantcopyopts.sil
17
- @@ -1,5 +1,7 @@
18
- // RUN: %target-sil-opt -module-name Swift -enable-sil-verify-all -semantic-arc-opts -sil-semantic-arc-peepholes-redundant-copyvalue-elim %s | %FileCheck %s
19
-
20
- + // XFAIL: OS=linux-android, OS=linux-androideabi
21
- +
22
- // NOTE: Some of our tests here depend on borrow elimination /not/ running!
23
- // Please do not add it to clean up the IR like we did in
24
- // semanticarcopts-loadcopy-to-loadborrow!
25
13
diff --git a/swift/utils/build-script-impl b/swift/utils/build-script-impl
26
14
index 16e05052609..7ab8cebfab8 100755
27
15
--- a/swift/utils/build-script-impl
@@ -48,15 +36,16 @@ index 324d1a77eea..e88601a8701 100644
48
36
49
37
from . import cmake_product
50
38
from . import product
51
- @@ -115,6 +117,22 @@ class SwiftTestingCMakeShim(cmake_product.CMakeProduct):
39
+ @@ -115,6 +117,24 @@ class SwiftTestingCMakeShim(cmake_product.CMakeProduct):
52
40
# FIXME: If we build macros for the builder, specify the path.
53
41
self.cmake_options.define('SwiftTesting_MACRO', 'NO')
54
42
55
43
+ if host_target.startswith('android') and self.is_cross_compile_target(host_target):
56
44
+ host_config = HostSpecificConfiguration(host_target, self.args)
57
45
+ self.cmake_options.extend(host_config.cmake_options)
58
- + flags = '-target %s-unknown-linux-android%s ' % (self.args.android_arch,
59
- + self.args.android_api_level)
46
+ + triple = '%s-unknown-linux-android%s' % (self.args.android_arch,
47
+ + self.args.android_api_level)
48
+ + flags = '-target %s ' % (triple)
60
49
+
61
50
+ flags += '-resource-dir %s/lib/swift ' % (
62
51
+ self.host_install_destdir(host_target) + self.args.install_prefix)
@@ -65,6 +54,7 @@ index 324d1a77eea..e88601a8701 100644
65
54
+ flags += '-sdk %s/sysroot ' % (ndk_path)
66
55
+ flags += '-tools-directory %s/bin' % (ndk_path)
67
56
+ self.cmake_options.define('CMAKE_Swift_FLAGS', flags)
57
+ + self.cmake_options.define('CMAKE_Swift_COMPILER_TARGET', triple)
68
58
+ self.cmake_options.define('CMAKE_CXX_COMPILER_WORKS', 'True')
69
59
+ self.cmake_options.define('CMAKE_FIND_ROOT_PATH', self.args.cross_compile_deps_path)
70
60
+
@@ -83,36 +73,6 @@ index 7f290d16..95366592 100644
83
73
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
84
74
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
85
75
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
86
- diff --git a/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake b/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake
87
- index 468dc61..a90ae3d 100644
88
- --- a/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake
89
- +++ b/swift-corelibs-xctest/cmake/modules/PlatformInfo.cmake
90
- @@ -2,6 +2,10 @@
91
- set(print_target_info_invocation "${CMAKE_Swift_COMPILER}" -print-target-info)
92
- if(CMAKE_Swift_COMPILER_TARGET)
93
- list(APPEND print_target_info_invocation -target ${CMAKE_Swift_COMPILER_TARGET})
94
- + else()
95
- + set(arg_list ${CMAKE_Swift_FLAGS})
96
- + separate_arguments(arg_list)
97
- + list(APPEND print_target_info_invocation ${arg_list})
98
- endif()
99
- execute_process(COMMAND ${print_target_info_invocation} OUTPUT_VARIABLE target_info_json)
100
- message(CONFIGURE_LOG "Swift Target Info: ${print_target_info_invocation}\n"
101
- diff --git a/swift-foundation/cmake/modules/SwiftFoundationSwiftSupport.cmake b/swift-foundation/cmake/modules/SwiftFoundationSwiftSupport.cmake
102
- index cbdfc2a..bb4121d 100644
103
- --- a/swift-foundation/cmake/modules/SwiftFoundationSwiftSupport.cmake
104
- +++ b/swift-foundation/cmake/modules/SwiftFoundationSwiftSupport.cmake
105
- @@ -37,6 +37,10 @@ function(_swift_foundation_install_target module)
106
- set(module_triple_command "${CMAKE_Swift_COMPILER}" -print-target-info)
107
- if(CMAKE_Swift_COMPILER_TARGET)
108
- list(APPEND module_triple_command -target ${CMAKE_Swift_COMPILER_TARGET})
109
- + else()
110
- + set(arg_list ${CMAKE_Swift_FLAGS})
111
- + separate_arguments(arg_list)
112
- + list(APPEND module_triple_command ${arg_list})
113
- endif()
114
- execute_process(COMMAND ${module_triple_command} OUTPUT_VARIABLE target_info_json)
115
- string(JSON module_triple GET "${target_info_json}" "target" "moduleTriple")
116
76
diff --git a/swift-testing/CMakeLists.txt b/swift-testing/CMakeLists.txt
117
77
index 1be9a4b..bd7b1bd 100644
118
78
--- a/swift-testing/CMakeLists.txt
@@ -125,33 +85,3 @@ index 1be9a4b..bd7b1bd 100644
125
85
set(CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
126
86
set(CMAKE_LIBRARY_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/lib)
127
87
set(CMAKE_RUNTIME_OUTPUT_DIRECTORY ${CMAKE_BINARY_DIR}/bin)
128
- diff --git a/swift-testing/cmake/modules/PlatformInfo.cmake b/swift-testing/cmake/modules/PlatformInfo.cmake
129
- index 94c60ef..ab8a491 100644
130
- --- a/swift-testing/cmake/modules/PlatformInfo.cmake
131
- +++ b/swift-testing/cmake/modules/PlatformInfo.cmake
132
- @@ -9,6 +9,10 @@
133
- set(print_target_info_invocation "${CMAKE_Swift_COMPILER}" -print-target-info)
134
- if(CMAKE_Swift_COMPILER_TARGET)
135
- list(APPEND print_target_info_invocation -target ${CMAKE_Swift_COMPILER_TARGET})
136
- + else()
137
- + set(arg_list ${CMAKE_Swift_FLAGS})
138
- + separate_arguments(arg_list)
139
- + list(APPEND print_target_info_invocation ${arg_list})
140
- endif()
141
- execute_process(COMMAND ${print_target_info_invocation} OUTPUT_VARIABLE target_info_json)
142
- message(CONFIGURE_LOG "Swift Target Info: ${print_target_info_invocation}\n"
143
- diff --git a/swift-testing/cmake/modules/TargetTriple.cmake b/swift-testing/cmake/modules/TargetTriple.cmake
144
- index e087cc4..02f3a95 100644
145
- --- a/swift-testing/cmake/modules/TargetTriple.cmake
146
- +++ b/swift-testing/cmake/modules/TargetTriple.cmake
147
- @@ -10,6 +10,10 @@
148
- set(SWT_TARGET_INFO_COMMAND "${CMAKE_Swift_COMPILER}" -print-target-info)
149
- if(CMAKE_Swift_COMPILER_TARGET)
150
- list(APPEND SWT_TARGET_INFO_COMMAND -target ${CMAKE_Swift_COMPILER_TARGET})
151
- + else()
152
- + set(arg_list ${CMAKE_Swift_FLAGS})
153
- + separate_arguments(arg_list)
154
- + list(APPEND SWT_TARGET_INFO_COMMAND ${arg_list})
155
- endif()
156
- execute_process(COMMAND ${SWT_TARGET_INFO_COMMAND} OUTPUT_VARIABLE SWT_TARGET_INFO_JSON)
157
- string(JSON SWT_TARGET_TRIPLE GET "${SWT_TARGET_INFO_JSON}" "target" "unversionedTriple")
0 commit comments