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
152
152
"Enable build of the embedded Swift standard library and runtime for cross-compiling targets"
153
153
FALSE )
154
154
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
+
155
158
if ((NOT SWIFT_HOST_VARIANT STREQUAL "macosx" ) AND (NOT SWIFT_HOST_VARIANT STREQUAL "linux" ) AND (NOT SWIFT_HOST_VARIANT STREQUAL "windows" ))
156
159
set (SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB FALSE )
157
160
elseif (BOOTSTRAPPING_MODE STREQUAL "OFF" )
@@ -250,6 +253,24 @@ if(SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB)
250
253
endif ()
251
254
endif ()
252
255
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
+
253
274
if (SWIFT_SHOULD_BUILD_EMBEDDED_STDLIB )
254
275
set (triples )
255
276
foreach (entry ${EMBEDDED_STDLIB_TARGET_TRIPLES} )
You can’t perform that action at this time.
0 commit comments