[clang] [Clang] Add multilib support for GPU targets (PR #192285)
Joseph Huber via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 16 08:14:04 PDT 2026
================
@@ -0,0 +1,80 @@
+# UNSUPPORTED: system-windows
+
+# Basic selection where -fmultilib-flag=debug selects the debug variant.
+# RUN: %clang --multi-lib-config=%s -no-canonical-prefixes -x c %s -### -o /dev/null 2>&1 \
+# RUN: --target=amdgcn-amd-amdhsa -mcpu=gfx1030 -fmultilib-flag=debug -nogpulib \
+# RUN: | FileCheck --check-prefix=CHECK-DEBUG %s
+# CHECK-DEBUG: "-cc1" "-triple" "amdgcn-amd-amdhsa"
+# CHECK-DEBUG: "-L{{[^"]*}}/debug"
+
+# Default behavior where no variant path is prepended.
+# RUN: %clang --multi-lib-config=%s -no-canonical-prefixes -x c %s -### -o /dev/null 2>&1 \
+# RUN: --target=amdgcn-amd-amdhsa -mcpu=gfx1030 -nogpulib \
+# RUN: | FileCheck --check-prefix=CHECK-DEFAULT %s
+# CHECK-DEFAULT-NOT: "-L{{[^"]*}}/debug"
----------------
jhuber6 wrote:
It's tough to check stuff like this without a `not` test. The problem is that the flags can show up in various orders depending on user configs so it's not feasible to check against the complete linker job.
https://github.com/llvm/llvm-project/pull/192285
More information about the cfe-commits
mailing list