Skip to content

Commit

Permalink
bintools-wrapper: ensure Swift auto-linked libraries can be found
Browse files Browse the repository at this point in the history
While the Swift wrapper should take care of this, not everything that
links these libraries goes through the wrapper.
reckenrode committed Oct 15, 2024
1 parent 60a1d9c commit 4340a5a
Showing 1 changed file with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
@@ -89,3 +89,9 @@ DEVELOPER_DIR=${DEVELOPER_DIR_@suffixSalt@:-@fallback_sdk@}
# Darwin looks for frameworks in the SDK located at `DEVELOPER_DIR`.
extraBefore+=("-F$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/System/Library/Frameworks")
extraBefore+=("-L$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib")

# While the Swift wrapper should take care of this, anything that needs to link Swift auto-linked frameworks
# also needs these paths. Note: Test and conditionally add it because the path may not exist in older SDKs.
if [ -d "$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/swift" ]; then
extraBefore+=("-L$DEVELOPER_DIR/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/lib/swift")
fi

0 comments on commit 4340a5a

Please sign in to comment.