Skip to content

Swift: avoid `CMAKE_{EXE,SHARED}_LINKER_FLAGS`

Saleem Abdulrasool requested to merge compnerd/cmake:give-it-a-good-shake into master

Avoid the use of CMAKE_{EXE,SHARED}_LINKER_FLAGS when linking with the Swift language. This required hoisting the executable flags of CMAKE_CREATE_WIN32_EXE, CMAKE_CREATE_CONSOLE_EXE, and CMAKE_EXE_EXPORTS_*_FLAG earlier to avoid a second clause which checks the language. This allows for mixed-language Swift projects to properly link on Windows.

Fixes: #19298 (closed)
Topic-rename: swift-linker-flags

Edited by Brad King

Merge request reports