Allow AOMP env var to end in lib/llvm. #1253
Open
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.
Historically the AOMP environment variable was intended to indicate where to install the AOMP compiler, AND for test scripts to identify where the compiler to test is found. For example clang++ is in $AOMP/bin/clang++. But we made a change to build and install AOMP using the ROCm installation directory structure, where compiler components go in the directory lib/llvm. Build scripts were changed to install compiler components in $AOMP_INSTALL_DIR/lib/llvm and non-compiler components such as debugger, hipcc, etc get installed in $AOMP_INSTALL_DIR . For the most part, we did NOT change testing scripts. That is, they expect to find clang++ at $AOMP/bin/clang++ etc. So for testing, AOMP should be set to AOMP_INSTALL_DIR/lib/llvm.
But what about build? What should AOMP be set to? We need to assume that AOMP is always pointing to the lowerer level directory (./lib/llvm) where the compiler is installed. This allows us to test ROCm, and trunk-built compilers. So if you dont want the script default to AOMP, set it to $HOME/rocm/aomp/lib/llvm. This set of changes will set AOMP_INSTALL_DIR to the higher level directory by setting AOMP_INSTALL_DIR to AOMP stripped of "lib/llvm" and adding on the version number. It also enforces that the stripped directory (without the version number) does not exist or is a symbolic link. The build_project.sh script will continue to link the versioned directory (e.g. aomp__21.0-0) to the stripped directory (aomp) upon successful compiler installation to AOMP_INSTALL_DIR/lib/llvm.
There are clarifying comments added to aomp_common_var.