Skip to content

[Build] Centralize component source roots via env vars - #2507

Merged
jplehr merged 1 commit into
ROCm:aomp-devfrom
jplehr:centralize-source-roots
Sep 7, 2026
Merged

[Build] Centralize component source roots via env vars#2507
jplehr merged 1 commit into
ROCm:aomp-devfrom
jplehr:centralize-source-roots

Conversation

@jplehr

@jplehr jplehr commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

Add AOMP_PROJECT_SRC, AOMP_SPIRV_SRC, and AOMP_SRC to aomp_common_vars and use them throughout the build_* scripts instead of hardcoding $AOMP_REPOS/. Defaults preserve the historical $AOMP_REPOS layout, so behavior is unchanged when the variables are unset.

This lets a single environment override redirect one component's source (e.g. to a per-task git worktree) without relocating the shared checkout of every other component. The llvm-project monorepo root is read by eight build scripts (project, offload, openmp, llvm_runtimes_standalone, comgr, libdevice, hipcc, extras) and must move together for a staged build to stay consistent; the previously hardcoded SPIRV-LLVM-Translator source is now overridable too.

Add AOMP_PROJECT_SRC, AOMP_SPIRV_SRC, and AOMP_SRC to aomp_common_vars and
use them throughout the build_* scripts instead of hardcoding
$AOMP_REPOS/<name>. Defaults preserve the historical $AOMP_REPOS layout, so
behavior is unchanged when the variables are unset.

This lets a single environment override redirect one component's source (e.g.
to a per-task git worktree) without relocating the shared checkout of every
other component. The llvm-project monorepo root is read by eight build
scripts (project, offload, openmp, llvm_runtimes_standalone, comgr,
libdevice, hipcc, extras) and must move together for a staged build to stay
consistent; the previously hardcoded SPIRV-LLVM-Translator source is now
overridable too.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

@mhalk mhalk 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! Nice consolidation :)

@mhalk

mhalk commented Sep 4, 2026

Copy link
Copy Markdown
Collaborator

BTW I checked out this branch, ran build_aomp.sh and it completed successfully.

@jplehr
jplehr merged commit f0114b4 into ROCm:aomp-dev Sep 7, 2026
1 check failed
@jplehr
jplehr deleted the centralize-source-roots branch September 7, 2026 09:49
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.

3 participants