aomp icon indicating copy to clipboard operation
aomp copied to clipboard

Allow AOMP env var to end in lib/llvm.

Open gregrodgers opened this issue 9 months ago • 0 comments
trafficstars

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.

gregrodgers avatar Feb 20 '25 15:02 gregrodgers