Skip to content

Introduce SWIFT_COMPILE_FLAGS_LINUX #26441

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions cmake/modules/AddSwift.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -1703,6 +1703,7 @@ function(add_swift_target_library name)
SWIFT_COMPILE_FLAGS_OSX
SWIFT_COMPILE_FLAGS_TVOS
SWIFT_COMPILE_FLAGS_WATCHOS
SWIFT_COMPILE_FLAGS_LINUX
SWIFT_MODULE_DEPENDS
SWIFT_MODULE_DEPENDS_CYGWIN
SWIFT_MODULE_DEPENDS_FREEBSD
Expand Down Expand Up @@ -1861,6 +1862,9 @@ function(add_swift_target_library name)
elseif(${sdk} STREQUAL WATCHOS OR ${sdk} STREQUAL WATCHOS_SIMULATOR)
list(APPEND swiftlib_swift_compile_flags_all
${SWIFTLIB_SWIFT_COMPILE_FLAGS_WATCHOS})
elseif(${sdk} STREQUAL LINUX)
list(APPEND swiftlib_swift_compile_flags_all
${SWIFTLIB_SWIFT_COMPILE_FLAGS_LINUX})
elseif(${sdk} STREQUAL WINDOWS)
# FIXME(SR2005) static and shared are not mutually exclusive; however
# since we do a single build of the sources, this doesn't work for
Expand Down
8 changes: 6 additions & 2 deletions stdlib/private/SwiftReflectionTest/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,13 @@
if (SWIFT_INCLUDE_TESTS)
add_swift_target_library(swiftSwiftReflectionTest ${SWIFT_STDLIB_LIBRARY_BUILD_TYPES} IS_STDLIB
SwiftReflectionTest.swift
SWIFT_MODULE_DEPENDS Darwin
TARGET_SDKS ALL_APPLE_PLATFORMS
SWIFT_COMPILE_FLAGS ${SWIFT_STANDARD_LIBRARY_SWIFT_FLAGS}
SWIFT_COMPILE_FLAGS_LINUX -Xcc -D_GNU_SOURCE
SWIFT_MODULE_DEPENDS_OSX Darwin
SWIFT_MODULE_DEPENDS_IOS Darwin
SWIFT_MODULE_DEPENDS_TVOS Darwin
SWIFT_MODULE_DEPENDS_WATCHOS Darwin
SWIFT_MODULE_DEPENDS_LINUX Glibc
INSTALL_IN_COMPONENT stdlib-experimental
DARWIN_INSTALL_NAME_DIR "${SWIFT_DARWIN_STDLIB_PRIVATE_INSTALL_NAME_DIR}")

Expand Down