File tree Expand file tree Collapse file tree 1 file changed +21
-0
lines changed
Expand file tree Collapse file tree 1 file changed +21
-0
lines changed Original file line number Diff line number Diff line change @@ -152,6 +152,9 @@ option(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB_CROSS_COMPILING
152152 "Enable build of the embedded Swift standard library and runtime for cross-compiling targets"
153153 FALSE )
154154
155+ set (SWIFT_EMBEDDED_STDLIB_EXTRA_TARGET_TRIPLES "" CACHE STRING
156+ "List of extra target triples to build the embedded Swift standard library for" )
157+
155158if ((NOT SWIFT_HOST_VARIANT STREQUAL "macosx" ) AND (NOT SWIFT_HOST_VARIANT STREQUAL "linux" ) AND (NOT SWIFT_HOST_VARIANT STREQUAL "windows" ))
156159 set (SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB FALSE )
157160elseif (BOOTSTRAPPING_MODE STREQUAL "OFF" )
@@ -250,6 +253,24 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
250253 endif ()
251254endif ()
252255
256+ foreach (triple ${SWIFT_EMBEDDED_STDLIB_EXTRA_TARGET_TRIPLES} )
257+ if (triple STREQUAL "" )
258+ continue ()
259+ endif ()
260+
261+ string (REGEX REPLACE "-" ";" list "${triple} " )
262+ list (GET list 0 arch)
263+ list (GET list 1 vendor)
264+ list (GET list 2 os)
265+ string (REGEX REPLACE "[0-9]+(\\ .[0-9]+)+" " " mod "${triple} " )
266+
267+ list (FILTER EMBEDDED_STDLIB_TARGET_TRIPLES EXCLUDE REGEX " ${mod} " )
268+
269+ list (APPEND EMBEDDED_STDLIB_TARGET_TRIPLES
270+ "${arch} ${mod} ${triple} "
271+ )
272+ endforeach ()
273+
253274if (SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
254275 set (triples)
255276 foreach (entry ${EMBEDDED_STDLIB_TARGET_TRIPLES} )
You can’t perform that action at this time.
0 commit comments