Skip to content

Conversation

@drodriguez
Copy link
Contributor

In LLVM unified builds, Swift normally lives in tools/swift and the paths from the CMake build directory are not always the same as in a standalone build.

Fix some tests using %clang-include-dir (which effectively points to $CMAKE_BUILD_ROOT/include) to use the new %swift-include-dir, which should point to the right include/ directory in both unified and standalone builds.

Additionally, change the calculation of %clang-include-dir to not be relative to the swift binary, but to the CMake build root instead.

In LLVM unified builds, Swift normally lives in `tools/swift` and the
paths from the CMake build directory are not always the same as in
a standalone build.

Fix some tests using `%clang-include-dir` (which effectively points to
`$CMAKE_BUILD_ROOT/include`) to use the new `%swift-include-dir`, which
should point to the right `include/` directory in both unified and
standalone builds.

Additionally, change the calculation of `%clang-include-dir` to not be
relative to the `swift` binary, but to the CMake build root instead.
@drodriguez
Copy link
Contributor Author

@swift-ci please test

@drodriguez drodriguez marked this pull request as ready for review January 12, 2025 06:33
@drodriguez drodriguez requested a review from rjmccall as a code owner January 12, 2025 06:33
@drodriguez drodriguez merged commit 1363190 into swiftlang:main Jan 13, 2025
5 checks passed
@drodriguez drodriguez deleted the fix-clang-vs-swift-include-dir branch January 13, 2025 16:10
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant