swiftlang / swift-foundation

The Foundation project
Apache License 2.0
2.36k stars 150 forks source link

Set `SWIFT_SYSTEM_NAME` for macro project in CMake #896

Closed jmschonfeld closed 2 weeks ago

jmschonfeld commented 2 weeks ago

When FoundationMacros was moved into its own CMake project, we did not copy over the SWIFT_SYSTEM_NAME setting. This results in the rpath for libFoundationMacros.so being $ORIGIN/../../../swift/:$ORIGIN/.. instead of the correct value ($ORIGIN/../../../swift/linux:$ORIGIN/.. for linux, for example). This fixes the macro build which allows #Predicate and #Expression to work as expected.

(note for context that this set value is used on line 90 of this file: INSTALL_RPATH "$ORIGIN/../../../swift/${SWIFT_SYSTEM_NAME}:$ORIGIN/..")

jmschonfeld commented 2 weeks ago

@swift-ci please test