From 3e42a0f1cad0f022ef5ee94893bb02106d847668 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Rodri=CC=81guez=20Troitin=CC=83o?= Date: Mon, 27 Jan 2020 22:51:25 -0800 Subject: [PATCH] [android] Escape include paths in Android. Before the result of `_add_variant_c_compile_flags` was a string, so appending several "-isystem" was not a problem. With #29451 the rules have changed since the list is now handled by CMake, and it deduplicates the repeated members in the list. Thanks, CMake. Should fix the Android CI builds that were failing since the merging of #29451. --- cmake/modules/AddSwift.cmake | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/cmake/modules/AddSwift.cmake b/cmake/modules/AddSwift.cmake index 56fa993418c07..efcdd40655eb3 100644 --- a/cmake/modules/AddSwift.cmake +++ b/cmake/modules/AddSwift.cmake @@ -363,7 +363,7 @@ function(_add_variant_c_compile_flags) swift_android_libcxx_include_paths(CFLAGS_CXX_INCLUDES) swift_android_include_for_arch("${CFLAGS_ARCH}" "${CFLAGS_ARCH}_INCLUDE") foreach(path IN LISTS CFLAGS_CXX_INCLUDES ${CFLAGS_ARCH}_INCLUDE) - list(APPEND result -isystem;${path}) + list(APPEND result "SHELL:${CMAKE_INCLUDE_SYSTEM_FLAG_C}${path}") endforeach() list(APPEND result "-D__ANDROID_API__=${SWIFT_ANDROID_API_LEVEL}") elseif(CFLAGS_SDK STREQUAL WINDOWS)