-
Notifications
You must be signed in to change notification settings - Fork 14.6k
[libclc] Make library output directories explicit #146833
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
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
These changes were split off from llvm#146503. This commit makes the output directories of libclc artefacts explicit. It creates a variable for the final output directory - LIBCLC_OUTPUT_LIBRARY_DIR - which has not changed. This allows future changes to alter the output directory more simply, such as by pointing it to somewhere inside clang's resource directory. This commit also changes the output directory of each target's intermediate builtins.*.bc files. They are now placed into each respective libclc target's object directory, rather than the top-level libclc binary directory. This should help keep the binary directory a bit tidier.
wenju-he
reviewed
Jul 3, 2025
wenju-he
approved these changes
Jul 4, 2025
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
This change broke installing symlinks. Now all symlinks are installed pointing to the build directory, i.e.:
and so on. |
mgorny
added a commit
to mgorny/llvm-project
that referenced
this pull request
Jul 20, 2025
This reverts commit 81e6552. This change caused libclc to start installing broken symlinks that contain absolute paths to the build directory rather than relative paths within the install directory.
mgorny
added a commit
to mgorny/llvm-project
that referenced
this pull request
Jul 20, 2025
Fix the symlink creation logic to use relative paths instead of absolute, in order to ensure that the installed symlinks actually refer to the installed .bc files rather than the ones from the build directory. This was broken in llvm#146833. The change is a bit roundabout but it attempts to preserve the spirit of llvm#146833, that is the ability to use multiple output directories (provided they all resides in `${LIBCLC_OUTPUT_LIBRARY_DIR}` and preserve the same structure in the installed tree). Signed-off-by: Michał Górny <[email protected]>
mgorny
added a commit
that referenced
this pull request
Jul 21, 2025
Fix the symlink creation logic to use relative paths instead of absolute, in order to ensure that the installed symlinks actually refer to the installed .bc files rather than the ones from the build directory. This was broken in #146833. The change is a bit roundabout but it attempts to preserve the spirit of #146833, that is the ability to use multiple output directories (provided they all resides in `${LIBCLC_OUTPUT_LIBRARY_DIR}` and preserve the same structure in the installed tree). Signed-off-by: Michał Górny <[email protected]>
tru
pushed a commit
to mgorny/llvm-project
that referenced
this pull request
Jul 22, 2025
This reverts commit 81e6552. This change caused libclc to start installing broken symlinks that contain absolute paths to the build directory rather than relative paths within the install directory.
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
These changes were split off from #146503.
This commit makes the output directories of libclc artefacts explicit. It creates a variable for the final output directory - LIBCLC_OUTPUT_LIBRARY_DIR - which has not changed. This allows future changes to alter the output directory more simply, such as by pointing it to somewhere inside clang's resource directory.
This commit also changes the output directory of each target's intermediate builtins.*.bc files. They are now placed into each respective libclc target's object directory, rather than the top-level libclc binary directory. This should help keep the binary directory a bit tidier.