summaryrefslogtreecommitdiffstats
path: root/Modules/CMakeSystemSpecificInitialize.cmake
diff options
context:
space:
mode:
authorEvan Wilde <etceterawilde@gmail.com>2024-03-24 02:02:55 (GMT)
committerEvan Wilde <etceterawilde@gmail.com>2024-04-15 15:23:39 (GMT)
commit56e5cea6008397f83479952d4c59964c32bc35fd (patch)
treeb7fc9b925f9a9967c55f8189d964149bfcfbde69 /Modules/CMakeSystemSpecificInitialize.cmake
parent6e545349143ee7ce14cfa213e5ae41586836b2c6 (diff)
downloadCMake-56e5cea6008397f83479952d4c59964c32bc35fd.zip
CMake-56e5cea6008397f83479952d4c59964c32bc35fd.tar.gz
CMake-56e5cea6008397f83479952d4c59964c32bc35fd.tar.bz2
Swift: Support module libraries with command-line build systems
Wire up the flags needed to support module libraries built and used with Swift. We need to pass `-bundle` to the linker when linking module libraries on Darwin, and we need to pass `-export-dynamic` to the linker when emitting an executable that exports symbols on Linux. This patch wires up `CMAKE_SHARED_MODULE_CREATE_Swift_FLAGS` and `CMAKE_SHARED_MODULE_LOADER_Swift_FLAG` on Darwin, and hooks up `CMAKE_EXE_EXPORTS_Swift_FLAG` on Linux in order to support passing things correctly. We can't expose `CMAKE_EXE_LINKER_FLAGS` to Swift, as it contains flags that the Swift compiler doesn't recognize, but the other language-specific variables are safe to expose.
Diffstat (limited to 'Modules/CMakeSystemSpecificInitialize.cmake')
0 files changed, 0 insertions, 0 deletions