Files
TheRock/compiler/amd-llvm/clang/test/Driver/rocm-detect-lib-llvm.hip
T
derek.holloway 7502bf64a4
CodeQL / Analyze (actions) (push) Canceled after 0s
CodeQL / Analyze (python) (push) Canceled after 0s
pre-commit / pre-commit (push) Canceled after 0s
Multi-Arch CI / setup (push) Canceled after 0s
Publish build_manylinux_x86_64 images / publish_build_manylinux_x86_64 (push) Canceled after 0s
Setup (Multi-Arch) / setup (push) Canceled after 0s
Multi-Arch CI / Linux::${{ fromJSON(needs.setup.outputs.linux_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubi10 image / publish_no_rocm_image_ubi10 (push) Canceled after 0s
Multi-Arch CI / Windows::${{ fromJSON(needs.setup.outputs.windows_build_config || '{}').build_variant_label || 'skip' }} (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Multi-Arch CI / Manifest Diff (push) Canceled after 0s
TheRock Manifest Diff Report / Generate Manifest Diff Report (push) Canceled after 0s
Multi-Arch CI / CI Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_ocl_rt images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04_rocgdb images / publish_no_rocm_image_ubuntu24_04_rocgdb (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_ocl_rt (push) Canceled after 0s
Publish TheRock Docker image / build-and-push-image (push) Canceled after 0s
Unit Tests / Unit Tests :: ubuntu-24.04 (push) Canceled after 0s
Unit Tests / Unit Tests :: windows-2022 (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_media (push) Canceled after 0s
Unit Tests / Unit Tests Summary (push) Canceled after 0s
Publish no_rocm_image_ubuntu24_04 images / publish_no_rocm_image_ubuntu24_04_openmpi (push) Canceled after 0s
Flatten subprojects into a single base monorepo
2026-09-02 16:34:47 -07:00

32 lines
1.6 KiB
Plaintext

// UNSUPPORTED: system-windows
//
// Copying clang to a new location and running it will not work unless it is
// statically linked. Dynamically linked builds typically use relative rpaths,
// which this will break.
// REQUIRES: static-libs
//
// Test detecting ROCm installation from clang installed in /opt/rocm/lib/llvm/bin.
// This exercises the RocmInstallationDetector logic that backs up from
// /opt/rocm/lib/llvm/bin to the ROCm root, while avoiding dependence on any
// real /opt/rocm installation by using a synthetic sysroot under %t.
//
// RUN: rm -rf %t/*
// Set up a fake ROCm installation rooted at /opt/rocm in the synthetic sysroot
// so that the device libraries and HIP runtime can be found.
// RUN: mkdir -p %t/sysroot/opt/rocm
// RUN: cp -r %S/Inputs/rocm/* %t/sysroot/opt/rocm
// Copy the built clang binary so that its InstalledDir and the real path used
// by the driver both reside under /opt/rocm/lib/llvm/bin, which is what the
// detection logic inspects.
// RUN: mkdir -p %t/sysroot/opt/rocm/lib/llvm/bin
// RUN: cp %clang %t/sysroot/opt/rocm/lib/llvm/bin/clang
// RUN: %t/sysroot/opt/rocm/lib/llvm/bin/clang -### --target=x86_64-linux-gnu \
// RUN: --offload-arch=gfx1010 --print-rocm-search-dirs %s 2>&1 \
// RUN: | FileCheck -check-prefixes=ROCM-LIB-LLVM %s
//
// ROCM-LIB-LLVM: ROCm installation search path: {{.*sysroot/opt/rocm$}}
// ROCM-LIB-LLVM-NOT: ROCm installation search path: {{.*sysroot/opt/rocm/lib$}}
// Clean up copy of large binary copied into temp directory to avoid bloat.
// RUN: rm -f %t/sysroot/opt/rocm/lib/llvm/bin/clang || true