Skip to content

[build] Link the Swift resource directory against the headers from a prebuilt clang, if building with one #40707

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 13, 2022
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 9 additions & 2 deletions stdlib/public/SwiftShims/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -203,16 +203,23 @@ if(SWIFT_BUILD_STATIC_STDLIB)
PATTERN "*.h")
endif()

if(SWIFT_BUILD_RUNTIME_WITH_HOST_COMPILER OR SWIFT_PREBUILT_CLANG)
# This will still link against the Swift-forked clang headers if the Swift
# toolchain was built with SWIFT_INCLUDE_TOOLS.
set(symlink_dir ${clang_headers_location})
else()
set(symlink_dir "../clang/${CLANG_VERSION}")
endif()

swift_install_symlink_component(clang-resource-dir-symlink
LINK_NAME clang
TARGET ../clang/${CLANG_VERSION}
TARGET ${symlink_dir}
DESTINATION "lib/swift")

if(SWIFT_BUILD_STATIC_STDLIB)
swift_install_symlink_component(clang-resource-dir-symlink
LINK_NAME clang
TARGET ../clang/${CLANG_VERSION}
TARGET ${symlink_dir}
DESTINATION "lib/swift_static")
endif()

Expand Down