Skip to content

[build] Stop assuming llvm is always the top-level in unified build #79342

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

Conversation

kateinoigakukun
Copy link
Member

Even with unified build, llvm is not always the top-level project but it can be a part of a larger build. (e.g. 1) In that case, CMAKE_BINARY_DIR is not the binary directory of llvm but the binary directory of the top-level project. This patch fixes the issue by using LLVM_BINARY_DIR instead.

Footnotes

  1. https://github.com/ChromeDevTools/devtools-frontend/blob/9b4b9070790196d78489756c515c528a0fe7ac00/extensions/cxx_debugging/CMakeLists.txt#L105

Even with unified build, llvm is not always the top-level project but it
can be a part of a larger build. (e.g. [^1]) In that case,
`CMAKE_BINARY_DIR` is not the binary directory of llvm but the binary
directory of the top-level project. This patch fixes the issue by using
`LLVM_BINARY_DIR` instead.

[^1]: https://github.com/ChromeDevTools/devtools-frontend/blob/9b4b9070790196d78489756c515c528a0fe7ac00/extensions/cxx_debugging/CMakeLists.txt#L105
@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

Copy link
Contributor

@drodriguez drodriguez left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@kateinoigakukun
Copy link
Member Author

@swift-ci smoke test

@kateinoigakukun kateinoigakukun merged commit 8ae7b53 into swiftlang:main Feb 13, 2025
3 checks passed
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.

2 participants