Skip to content

[aux-overlay] Use install(CODE) for directory symlinks - #4301

Closed
FIM43-Redeye wants to merge 2 commits into
ROCm:mainfrom
FIM43-Redeye:fix/aux-overlay-symlinks
Closed

FIM43-Redeye wants to merge 2 commits into
ROCm:mainfrom
FIM43-Redeye:fix/aux-overlay-symlinks

Conversation

@FIM43-Redeye

Copy link
Copy Markdown
Contributor

Summary

  • install(FILES) rejects symlinks that point to directories, breaking
    installation of the llvm and amdgcn symlinks
  • Replace with install(CODE) using file(CREATE_LINK) to create them
    at install time

Fixes #3714

Copilot AI review requested due to automatic review settings April 1, 2026 21:31

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

This PR updates the aux-overlay install logic to correctly handle symlinks that point to directories (not supported by install(FILES)), addressing failures in installing the llvm and amdgcn links (Fixes #3714).

Changes:

  • Replace install(FILES ...) usage for directory symlinks with install(CODE ...) + file(CREATE_LINK ...).
  • Adjust installation of tool symlinks to install individual bin/* links into DESTINATION bin instead of trying to install the whole bin directory as a “file”.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread base/aux-overlay/CMakeLists.txt Resolved
@FIM43-Redeye
FIM43-Redeye force-pushed the fix/aux-overlay-symlinks branch from 575be24 to 03d212d Compare April 1, 2026 21:42
@FIM43-Redeye

Copy link
Copy Markdown
Contributor Author

Quick ping, can someone approve CI? The change is pretty small and it fixes #3714.

@FIM43-Redeye
FIM43-Redeye force-pushed the fix/aux-overlay-symlinks branch from b462a95 to cb1e546 Compare April 22, 2026 20:52
install(FILES) rejects symlinks that point to directories, which
causes the llvm and amdgcn symlinks to fail during installation.
Replace with install(CODE) using file(CREATE_LINK) to create the
symlinks directly at install time, with correct targets matching
the build-time symlinks (llvm -> lib/llvm, amdgcn -> lib/llvm/amdgcn).

Fixes ROCm#3714

Generated using Claude Code.
@FIM43-Redeye
FIM43-Redeye force-pushed the fix/aux-overlay-symlinks branch from cb1e546 to 25da31d Compare April 29, 2026 00:11
@FIM43-Redeye

Copy link
Copy Markdown
Contributor Author

Hi, following up on this 'cause it's been about a month and the PR is still sitting in triage TODO. This is a smalal CMake fix that resolves #3714 (broken amdclang symlincs affecting ROCm installation), I've kept it rebased to current main.
Is there a specific maintainer who handles aux-overlay or build system changes that I should tag for review? Happy to address any feedback whenever someone has time to look. Thanks!

@stellaraccident
stellaraccident self-requested a review May 2, 2026 00:43

@stellaraccident stellaraccident left a comment

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

LGTM. In general, PRs without a reviewer go to the bottom of the pile.

@amd-shiraz we should have CODEOWNERS and auto assign teams on TheRock so that things don't get lost.

@stellaraccident

Copy link
Copy Markdown
Collaborator

FYI - I've got a relatively large Fortran refactor (#3928) which will mid-air collide with this one. Since I'm doing a lot of testing of that, I'm incorporating the fixes here into that one. Will aim to land right after 7.13 tags (~this coming week).

stellaraccident added a commit that referenced this pull request May 2, 2026
Changes:

- Restore rocprofiler-systems to the mainline compiler/dependency shape and keep only the Fortran-disabled example filter.

- Drop the split offload pre-hook and amd-llvm-offload runtime edge from rocprofiler-systems.

- Incorporate the aux-overlay directory-symlink install fix from #4301, with an install-prefix guard for standalone installs.

Claude Code
@FIM43-Redeye

Copy link
Copy Markdown
Contributor Author

Makes sense to me, closing as to-be-implemented-elsewhere.

@github-project-automation github-project-automation Bot moved this from TODO to Done in TheRock Triage May 2, 2026
@FIM43-Redeye
FIM43-Redeye deleted the fix/aux-overlay-symlinks branch May 2, 2026 22:50
stellaraccident added a commit that referenced this pull request May 4, 2026
Changes:

- Restore rocprofiler-systems to the mainline compiler/dependency shape and keep only the Fortran-disabled example filter.

- Drop the split offload pre-hook and amd-llvm-offload runtime edge from rocprofiler-systems.

- Incorporate the aux-overlay directory-symlink install fix from #4301, with an install-prefix guard for standalone installs.

Claude Code
stellaraccident added a commit that referenced this pull request May 9, 2026
Partial landing split from #3928.

Changes:

- Replace install(FILES) for the root llvm and amdgcn directory symlinks
with install(CODE) that creates the symlinks at install time.

- Create the install prefix inside the install code before creating
root-level symlinks; local validation showed the closed #4301 form
failed when the prefix did not exist yet.

- Leave the existing amdflang symlink behavior unchanged; conditional
Fortran symlink handling remains with the split compiler work.

Rationale:

- CMake install(FILES) rejects directory symlinks, which breaks
aux-overlay installation for the SDK layout symlinks tracked by #3714.

Validation:

- cmake -S base/aux-overlay -B /tmp/therock-aux-overlay-test-build
-GNinja
-DTHEROCK_SOURCE_DIR=/srv/vm-shared/projects/therock-workspace1/worktrees/TheRock
-DTHEROCK_PACKAGE_VERSION=0.0.0 -DGPU_TARGETS=gfx1100

- cmake --build /tmp/therock-aux-overlay-test-build

- cmake --install /tmp/therock-aux-overlay-test-build --prefix
/tmp/therock-aux-overlay-test-install

- verified llvm, amdgcn, and bin/amdclang are symlinks in
/tmp/therock-aux-overlay-test-install

- git diff --cached --check

Generated with Codex
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

[Issue]: amdclang symlinks are broken in ROCm artifacts and installed in multiple incorrect locations

3 participants