[clang] [flang] [Flang][Driver][Offload] Support -Xoffload-linker argument in Flang (PR #109907)

Joseph Huber via cfe-commits cfe-commits at lists.llvm.org
Thu Sep 26 08:05:54 PDT 2024


================
@@ -1,9 +1,10 @@
-! RUN %flang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx90a -Xoffload-linker a %s 2>&1 | FileCheck %s --check-prefixes=CHECK-XLINKER
+! Test the -Xoffload-linker flag that forwards link commands to the clang-linker-wrapper used
+! to help link offloading device libraries
 
-! CHECK-XLINKER {{.*}}--device-linker=a{{.*}}
+! RUN: %flang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx90a -Xoffload-linker a %s 2>&1 | FileCheck %s --check-prefixes=CHECK-XLINKER
 
-! RUN: %flang -### --target=x86_64-unknown-linux-gnu -fopenmp --offload-arch=gfx90a -Xoffload-linker a -Xoffload-linker-amdgcn-amd-amdhsa b %s 2>&1 | FileCheck %s --check-prefixes=CHECK-XLINKER-AMDGCN
+! CHECK-XLINKER: -device-linker=a{{.*}}-
----------------
jhuber6 wrote:

and a `-` here?

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


More information about the cfe-commits mailing list