Files
swift-mirror/stdlib/public/CommandLineSupport/CMakeLists.txt
Kuba (Brecka) Mracek 7538949859 Split out CommandLine enum into a separate static library, allow removing it from stdlib (#39591)
This is for the 'freestanding' build to stop assuming the platform has argc/argv.

- Introduce a new sub-library, libswiftCommandLineSupport.a
- Move stubs/CommandLine.cpp into this library
- Conditionally embed it into libswiftCore
- Conditionally embed it into libswiftPrivateLibcExtras if not in libswiftCore to support testing
- Add SWIFT_STDLIB_HAS_COMMANDLINE CMake (and build-script) flag
2021-10-13 07:02:43 -07:00

9 lines
292 B
CMake

add_swift_target_library(swiftCommandLineSupport
STATIC DONT_EMBED_BITCODE NOSWIFTRT
CommandLine.cpp
C_COMPILE_FLAGS ${SWIFT_RUNTIME_CXX_FLAGS}
LINK_FLAGS ${SWIFT_RUNTIME_LINK_FLAGS}
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
INSTALL_IN_COMPONENT never_install
)