You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
These are better done via the SwiftConfigureSDK mechanism rather than
how I was doing them previously. Additionally, I've changed the way
that the swift-threading-package option works. In addition to
specifying just a single package name, you can specify it as a CMake
list (i.e. separate by semicolons) of colon-separated `sdk:package`
pairs, e.g. `osx:darwin;linux:pthreads`. You can also override it
for all SDKs and then specify for a given SDK; specifications for a
particular SDK take precedence over the global override. For instance
`pthreads;osx:darwin` says to use `pthreads` except on the OS X SDK
where we should use `darwin`.
Copy file name to clipboardExpand all lines: utils/build-script-impl
+25-6
Original file line number
Diff line number
Diff line change
@@ -206,7 +206,7 @@ KNOWN_SETTINGS=(
206
206
swift-stdlib-has-dladdr "1""whether to build stdlib assuming the runtime environment provides dladdr API"
207
207
swift-stdlib-supports-backtrace-reporting """whether to build stdlib assuming the runtime environment provides the backtrace(3) API, if not set defaults to true on all platforms except for Cygwin, Haiku and wasm"
208
208
swift-runtime-static-image-inspection "0""whether to build stdlib assuming the runtime environment only supports a single runtime image with Swift code"
209
-
swift-threading-package """which threading package to use for Swift; valid values are empty string (default based on platform), 'pthreads', 'darwin', 'linux', 'win32', 'c11', 'none'"
209
+
swift-threading-package """override the threading package for the host build; this is either a single package or a semicolon-separated list of sdk:package pairs. Valid packages are empty string (no override), 'pthreads', 'darwin', 'linux', 'win32', 'c11', 'none'"
210
210
swift-stdlib-single-threaded-concurrency "0""build Swift concurrency in single-threaded mode"
211
211
swift-stdlib-concurrency-tracing """whether to enable tracing signposts for concurrency; default is 1 on Darwin platforms, 0 otherwise"
212
212
swift-stdlib-os-versioning "1""whether to build stdlib with availability based on OS versions (Darwin only)"
@@ -2227,15 +2227,34 @@ for host in "${ALL_HOSTS[@]}"; do
2227
2227
)
2228
2228
fi
2229
2229
2230
-
if [[ "${SWIFT_THREADING_PACKAGE}" ]] ;then
2231
-
case"${SWIFT_THREADING_PACKAGE}"in
2230
+
# SWIFT_THREADING_PACKAGE can be:
2231
+
#
2232
+
# - Empty
2233
+
# - A single package name
2234
+
# - A semicolon separated sequence of sdk:package pairs
2235
+
#
2236
+
OFS=$IFS
2237
+
IFS=';'
2238
+
foreltin$SWIFT_THREADING_PACKAGE;do
2239
+
if [[ $elt==*:* ]];then
2240
+
sdk=${elt/:*/}
2241
+
package=${elt/*:/}
2242
+
else
2243
+
sdk='<any>'
2244
+
package=$elt
2245
+
fi
2246
+
2247
+
case$packagein
2232
2248
"" | pthreads | darwin | linux | win32 | c11 | none) ;;
2233
2249
*)
2234
-
echo"build-script: unknown threading package ${SWIFT_THREADING_PACKAGE}; must be one of 'pthreads', 'darwin', 'linux', 'win32', 'c11', 'none', or empty for platform default">&2
2235
-
exit 1
2236
-
;;
2250
+
echo"build-script: unknown threading package $package for sdk $sdk; must be one of 'pthreads', 'darwin', 'linux', 'win32', 'c11', 'none', or empty for sdk default"
0 commit comments