mirror of
https://github.com/apple/swift.git
synced 2025-12-14 20:36:38 +01:00
Add a SWIFT_FREESTANDING_MODULE_NAME CMake option (#34018)
This commit is contained in:
committed by
GitHub
parent
12c356b3d2
commit
41f91d5365
@@ -32,11 +32,14 @@ if(swift_build_freestanding)
|
|||||||
"Which SDK to use when building the FREESTANDING stdlib")
|
"Which SDK to use when building the FREESTANDING stdlib")
|
||||||
set(SWIFT_FREESTANDING_TRIPLE_NAME "" CACHE STRING
|
set(SWIFT_FREESTANDING_TRIPLE_NAME "" CACHE STRING
|
||||||
"Which triple name (e.g. 'none-macho') to use when building the FREESTANDING stdlib")
|
"Which triple name (e.g. 'none-macho') to use when building the FREESTANDING stdlib")
|
||||||
|
set(SWIFT_FREESTANDING_MODULE_NAME "" CACHE STRING
|
||||||
|
"Which .swiftmodule name (e.g. 'freestanding') to use when building the FREESTANDING stdlib")
|
||||||
set(SWIFT_FREESTANDING_ARCHS "" CACHE STRING
|
set(SWIFT_FREESTANDING_ARCHS "" CACHE STRING
|
||||||
"Which architectures to build when building the FREESTANDING stdlib")
|
"Which architectures to build when building the FREESTANDING stdlib")
|
||||||
configure_sdk_darwin(
|
configure_sdk_darwin(
|
||||||
FREESTANDING "FREESTANDING" ""
|
FREESTANDING "FREESTANDING" ""
|
||||||
"${SWIFT_FREESTANDING_SDK}" freestanding "${SWIFT_FREESTANDING_TRIPLE_NAME}" freestanding "${SWIFT_FREESTANDING_ARCHS}")
|
"${SWIFT_FREESTANDING_SDK}" freestanding
|
||||||
|
"${SWIFT_FREESTANDING_TRIPLE_NAME}" "${SWIFT_FREESTANDING_MODULE_NAME}" "${SWIFT_FREESTANDING_ARCHS}")
|
||||||
set(SWIFT_SDK_FREESTANDING_LIB_SUBDIR "freestanding")
|
set(SWIFT_SDK_FREESTANDING_LIB_SUBDIR "freestanding")
|
||||||
configure_target_variant(FREESTANDING-DA "FREESTANDING Debug+Asserts" FREESTANDING DA "Debug+Asserts")
|
configure_target_variant(FREESTANDING-DA "FREESTANDING Debug+Asserts" FREESTANDING DA "Debug+Asserts")
|
||||||
configure_target_variant(FREESTANDING-RA "FREESTANDING Release+Asserts" FREESTANDING RA "Release+Asserts")
|
configure_target_variant(FREESTANDING-RA "FREESTANDING Release+Asserts" FREESTANDING RA "Release+Asserts")
|
||||||
|
|||||||
@@ -2469,6 +2469,7 @@ swift-primary-variant-arch=x86_64
|
|||||||
swift-freestanding-sdk=macosx
|
swift-freestanding-sdk=macosx
|
||||||
# For now, until clang/swiftc works correctly with "none-macho" as the OS part of target triple.
|
# For now, until clang/swiftc works correctly with "none-macho" as the OS part of target triple.
|
||||||
swift-freestanding-triple-name=macosx11.0
|
swift-freestanding-triple-name=macosx11.0
|
||||||
|
swift-freestanding-module-name=macos
|
||||||
swift-freestanding-archs=x86_64
|
swift-freestanding-archs=x86_64
|
||||||
|
|
||||||
#===----------------------------------------------------------------------===#
|
#===----------------------------------------------------------------------===#
|
||||||
|
|||||||
@@ -202,6 +202,7 @@ KNOWN_SETTINGS=(
|
|||||||
## FREESTANDING Stdlib Options
|
## FREESTANDING Stdlib Options
|
||||||
swift-freestanding-sdk "" "which SDK to use when building the FREESTANDING stdlib"
|
swift-freestanding-sdk "" "which SDK to use when building the FREESTANDING stdlib"
|
||||||
swift-freestanding-triple-name "" "which triple name (e.g. 'none-macho') to use when building the FREESTANDING stdlib"
|
swift-freestanding-triple-name "" "which triple name (e.g. 'none-macho') to use when building the FREESTANDING stdlib"
|
||||||
|
swift-freestanding-module-name "" "which .swiftmodule name (e.g. 'freestanding') to use when building the FREESTANDING stdlib"
|
||||||
swift-freestanding-archs "" "space-separated list of which architectures to build when building the FREESTANDING stdlib"
|
swift-freestanding-archs "" "space-separated list of which architectures to build when building the FREESTANDING stdlib"
|
||||||
|
|
||||||
## Uncategorised
|
## Uncategorised
|
||||||
@@ -1901,6 +1902,13 @@ for host in "${ALL_HOSTS[@]}"; do
|
|||||||
)
|
)
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [ "${SWIFT_FREESTANDING_MODULE_NAME}" ] ; then
|
||||||
|
cmake_options=(
|
||||||
|
"${cmake_options[@]}"
|
||||||
|
-DSWIFT_FREESTANDING_MODULE_NAME:STRING="${SWIFT_FREESTANDING_MODULE_NAME}"
|
||||||
|
)
|
||||||
|
fi
|
||||||
|
|
||||||
if [[ "${SWIFT_FREESTANDING_ARCHS}" ]] ; then
|
if [[ "${SWIFT_FREESTANDING_ARCHS}" ]] ; then
|
||||||
cmake_options=(
|
cmake_options=(
|
||||||
"${cmake_options[@]}"
|
"${cmake_options[@]}"
|
||||||
|
|||||||
Reference in New Issue
Block a user