Skip to content

Commit 13e9019

Browse files
author
git apple-llvm automerger
committed
Merge commit '561dcb26d459' from llvm.org/main into next
2 parents 743f0a7 + 561dcb2 commit 13e9019

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1156,13 +1156,12 @@ def fno_convergent_functions : Flag<["-"], "fno-convergent-functions">,
11561156
// Common offloading options
11571157
let Group = offload_Group in {
11581158
def offload_arch_EQ : Joined<["--"], "offload-arch=">,
1159-
Visibility<[ClangOption, FlangOption]>, Flags<[NoXarchOption]>,
1159+
Visibility<[ClangOption, FlangOption]>,
11601160
HelpText<"Specify an offloading device architecture for CUDA, HIP, or OpenMP. (e.g. sm_35). "
11611161
"If 'native' is used the compiler will detect locally installed architectures. "
11621162
"For HIP offloading, the device architecture can be followed by target ID features "
11631163
"delimited by a colon (e.g. gfx908:xnack+:sramecc-). May be specified more than once.">;
11641164
def no_offload_arch_EQ : Joined<["--"], "no-offload-arch=">,
1165-
Flags<[NoXarchOption]>,
11661165
Visibility<[ClangOption, FlangOption]>,
11671166
HelpText<"Remove CUDA/HIP offloading device architecture (e.g. sm_35, gfx906) from the list of devices to compile for. "
11681167
"'all' resets the list to its default value.">;

clang/test/Driver/offload-Xarch.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,10 @@
1414
// RUN: --target=x86_64-unknown-linux-gnu -Xopenmp-target=nvptx64-nvidia-cuda --offload-arch=sm_52,sm_60 -nogpuinc \
1515
// RUN: -Xopenmp-target=amdgcn-amd-amdhsa --offload-arch=gfx90a,gfx1030 -ccc-print-bindings -### %s 2>&1 \
1616
// RUN: | FileCheck -check-prefix=OPENMP %s
17+
// RUN: %clang -fopenmp=libomp -fopenmp-targets=nvptx64-nvidia-cuda,amdgcn-amd-amdhsa -nogpulib \
18+
// RUN: --target=x86_64-unknown-linux-gnu -Xarch_nvptx64 --offload-arch=sm_52,sm_60 -nogpuinc \
19+
// RUN: -Xarch_amdgcn --offload-arch=gfx90a,gfx1030 -ccc-print-bindings -### %s 2>&1 \
20+
// RUN: | FileCheck -check-prefix=OPENMP %s
1721

1822
// OPENMP: # "x86_64-unknown-linux-gnu" - "clang", inputs: ["[[INPUT:.+]]"], output: "[[HOST_BC:.+]]"
1923
// OPENMP: # "amdgcn-amd-amdhsa" - "clang", inputs: ["[[INPUT]]", "[[HOST_BC]]"], output: "[[GFX1030_BC:.+]]"

0 commit comments

Comments
 (0)