Skip to content

Commit 1395c25

Browse files
authored
Merge pull request swiftlang#23755 from drodriguez/fix-android-armv7-blocks-runtime-stub
[android] Allow BlocksRuntimeStub to compile for Android
2 parents fa7f8c4 + ea90256 commit 1395c25

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

test/CMakeLists.txt

+9-6
Original file line numberDiff line numberDiff line change
@@ -204,13 +204,16 @@ foreach(SDK ${SWIFT_SDKS})
204204
__declspec(dllexport)
205205
#endif
206206
_Block_release(void) { }\n")
207-
add_library(BlocksRuntimeStub-${SDK}-${ARCH} SHARED
207+
_add_swift_library_single(
208+
BlocksRuntimeStub-${SDK}-${ARCH}
209+
BlocksRuntimeStub
210+
SHARED
211+
DONT_EMBED_BITCODE
212+
NOSWIFTRT
213+
ARCHITECTURE ${ARCH}
214+
SDK ${SDK}
215+
INSTALL_IN_COMPONENT dev
208216
${test_bin_dir}/BlocksRuntime.c)
209-
if(CMAKE_C_COMPILER_ID STREQUAL Clang AND
210-
NOT CMAKE_C_COMPILER_SIMULATE_ID STREQUAL MSVC)
211-
target_compile_options(BlocksRuntimeStub-${SDK}-${ARCH} PRIVATE
212-
-target;${SWIFT_SDK_${SDK}_ARCH_${ARCH}_TRIPLE})
213-
endif()
214217
set_target_properties(BlocksRuntimeStub-${SDK}-${ARCH} PROPERTIES
215218
ARCHIVE_OUTPUT_DIRECTORY ${test_bin_dir}
216219
LIBRARY_OUTPUT_DIRECTORY ${test_bin_dir}

0 commit comments

Comments
 (0)