Skip to content

Commit 9c0ce3f

Browse files
committed
add lit test for --no-offloadlib
Signed-off-by: jinge90 <[email protected]>
1 parent 0c96648 commit 9c0ce3f

File tree

4 files changed

+7
-1
lines changed

4 files changed

+7
-1
lines changed

clang/include/clang/Driver/Options.td

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5959,7 +5959,7 @@ def no_offloadlib
59595959
: Flag<["--"], "no-offloadlib">,
59605960
MarshallingInfoFlag<LangOpts<"NoGPULib">>,
59615961
Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
5962-
HelpText<"Do not link device library for CUDA/HIP device compilation">;
5962+
HelpText<"Do not link device library for CUDA/HIP/SYCL device compilation">;
59635963
def offloadlib : Flag<["--"], "offloadlib">,
59645964
Visibility<[ClangOption, CC1Option, FlangOption, FC1Option]>,
59655965
HelpText<"Link device libraries for GPU device compilation">;

clang/test/Driver/sycl-device-lib-old-model.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@
133133
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB
134134
// RUN: %clangxx -fsycl --no-offload-new-driver %s -fno-sycl-device-lib=libc,all,libm-fp64,libm-fp32 --sysroot=%S/Inputs/SYCL -### 2>&1 \
135135
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB
136+
// RUN: %clangxx -fsycl --no-offload-new-driver %s --no-offloadlib --sysroot=%S/Inputs/SYCL -### 2>&1 \
137+
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB
136138
// SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB: {{.*}}clang{{.*}} "-cc1" "-triple" "spir64-unknown-unknown"
137139
// SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB-NOT: libsycl-cmath.bc
138140

clang/test/Driver/sycl-device-lib-win.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,8 @@
133133
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB
134134
// RUN: %clangxx -fsycl %s -fno-sycl-device-lib=libc,all,libm-fp64,libm-fp32 --sysroot=%S/Inputs/SYCL -### 2>&1 \
135135
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB
136+
// RUN: %clangxx -fsycl %s --no-offloadlib --sysroot=%S/Inputs/SYCL -### 2>&1 \
137+
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB
136138
// SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB: {{.*}}clang{{.*}} "-cc1" "-triple" "spir64-unknown-unknown"
137139
// SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB-NOT: libsycl-cmath.bc
138140

clang/test/Driver/sycl-device-lib.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -134,6 +134,8 @@
134134
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB
135135
// RUN: %clangxx -fsycl --offload-new-driver %s -fno-sycl-device-lib=libc,all,libm-fp64,libm-fp32 --sysroot=%S/Inputs/SYCL -### 2>&1 \
136136
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB
137+
// RUN: %clangxx -fsycl --offload-new-driver %s --no-offloadlib --sysroot=%S/Inputs/SYCL -### 2>&1 \
138+
// RUN: | FileCheck %s -check-prefix=SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB
137139
// SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB: {{.*}}clang{{.*}} "-cc1" "-triple" "spir64-unknown-unknown"
138140
// SYCL_DEVICE_LIB_LINK_NO_DEVICE_LIB-NOT: libsycl-cmath.new.o
139141

0 commit comments

Comments
 (0)