[clang] [Clang] Add multilib support for GPU targets (PR #192285)

Matt Arsenault via cfe-commits cfe-commits at lists.llvm.org
Thu Apr 16 08:12:05 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"
----------------
arsenm wrote:

I don't really trust -NOT checks, especially with regex. Can this be simplified 

https://github.com/llvm/llvm-project/pull/192285


More information about the cfe-commits mailing list