Commit Graph

4 Commits

Author SHA1 Message Date
Evan Wilde
e1d635e71c Swift: Expand generator expressions in Swift_MODULE_DIRECTORY
This patch makes the `Swift_MODULE_DIRECTORY` property behave more like
the other output directory properties, allowing generator expressions
and fixing the behavior with multi-config generators.

Issue: #26010
2024-12-09 10:37:05 -08:00
Evan Wilde
8669176576 Swift: Fix INSTALL_NAME_DIR under CMP0157 NEW behavior
Setting `CMAKE_INSTALL_NAME_DIR` or the `INSTALL_NAME_DIR` on Swift
targets had no effect when CMP0157 was set to `NEW`.  This was a result
of missing the `<TARGET_INSTALLNAME_DIR>` before the `<TARGET_SONAME>`.
Fix that and add a test to verify that the install name directory is
included in the install name.

Fixes: #26175
2024-08-01 10:49:36 -04:00
Evan Wilde
f292e28b84 Swift: Ninja: Pass module name to all swift builds
Executables that don't export a public API should not emit a
swiftmodule, but the swift modulename is observable from within the
program, so we should still set the module name on executable builds.

Fixes: #25710
2024-02-23 11:12:05 -05:00
Saleem Abdulrasool
9e829779f2 Swift: preserve -static for static library swiftmodules
The `-static` is important for the emission of the module as it is
serialized into the swiftmodule which then is used by the Swift frontend
to decide how to link to the symbol (via the GOT or not, or the IAT on
Windows). This repairs building static libraries with Swift on Windows.
2024-01-09 09:13:34 -08:00