Skip to content

Commit

Permalink
Merge branch 'yxsamliu-update-clang-rocm'
Browse files Browse the repository at this point in the history
  • Loading branch information
mattgodbolt committed Jun 18, 2024
2 parents 9cc26f7 + 36a8e31 commit d9b495f
Showing 1 changed file with 18 additions and 6 deletions.
24 changes: 18 additions & 6 deletions build/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -140,17 +140,29 @@ dascandy-contracts-trunk)
;;
rocm-*)
if [[ "${VERSION#rocm-}" == "trunk" ]]; then
BRANCH=amd-stg-open
ROCM_DEVICE_LIBS_BRANCH=${BRANCH}
BRANCH=amd-stging
VERSION=rocm-trunk-$(date +%Y%m%d)
CMAKE_EXTRA_ARGS+=("-DLLVM_ENABLE_ASSERTIONS=1")
ROCM_VERSION=999999 # trunk builds are "infinitely" far into the future
else
TAG=${VERSION}
if [[ "${VERSION}" =~ rocm-([0-9]+)\.([0-9]+)\.[^.]+ ]]; then
x=${BASH_REMATCH[1]}
y=${BASH_REMATCH[2]}
ROCM_VERSION=$(( x * 100 + y ))
fi
fi
if (( ROCM_VERSION < 601 )); then
ROCM_DEVICE_LIBS_BRANCH=${VERSION}
ROCM_DEVICE_LIBS_URL=https://github.com/ROCm/ROCm-Device-Libs.git
else
CMAKE_EXTRA_ARGS+=(
"-DLLVM_EXTERNAL_PROJECTS=device-libs;comgr"
"-DLLVM_EXTERNAL_DEVICE_LIBS_SOURCE_DIR=${ROOT}/llvm-project/amd/device-libs"
"-DLLVM_EXTERNAL_COMGR_SOURCE_DIR=${ROOT}/llvm-project/amd/comgr"
)
fi

URL=https://github.com/RadeonOpenCompute/llvm-project.git
ROCM_DEVICE_LIBS_URL=https://github.com/RadeonOpenCompute/ROCm-Device-Libs.git

URL=https://github.com/ROCm/llvm-project.git
LLVM_ENABLE_PROJECTS="clang;lld;clang-tools-extra;compiler-rt"
CMAKE_EXTRA_ARGS+=("-DLLVM_TARGETS_TO_BUILD=AMDGPU;X86")
;;
Expand Down

0 comments on commit d9b495f

Please sign in to comment.