Skip to content

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.

Topic-rename: swift-module-libraries

Edited by Brad King

Merge request reports