Skip to content

Commit 00cdfe5

Browse files
[SYCL][clang-linker-wrapper] Replace -lto-emit-asm option with -S for cuda pipeline (#18000)
`-lto-emit-asm` was used previously for cuda kernels pipeline when `-flto` was also used to generate ptx assembly. But after removing lto for cuda kernels, we don't need this option, instead we should use `-S` clang option to generate the ptx assembly for cuda kernels. Fixing issue [17812](#17812)
1 parent 0a42cf7 commit 00cdfe5

File tree

4 files changed

+1
-7
lines changed

4 files changed

+1
-7
lines changed

clang/tools/clang-linker-wrapper/ClangLinkerWrapper.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -1546,7 +1546,7 @@ Expected<StringRef> clang(ArrayRef<StringRef> InputFiles, const ArgList &Args,
15461546
CmdArgs.push_back("-Wl,--no-undefined");
15471547

15481548
if (IsSYCLKind && Triple.isNVPTX())
1549-
CmdArgs.push_back("-Wl,--lto-emit-asm");
1549+
CmdArgs.push_back("-S");
15501550
for (StringRef InputFile : InputFiles)
15511551
CmdArgs.push_back(InputFile);
15521552

sycl/test-e2e/NewOffloadDriver/multisource.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,6 @@
55
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
66
//
77
//===----------------------------------------------------------------------===//
8-
// UNSUPPORTED: true
9-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17812
108
// Separate kernel sources and host code sources
119
// Test with `--offload-new-driver`
1210
// RUN: %{build} --offload-new-driver -c -o %t.kernel.o -DINIT_KERNEL -DCALC_KERNEL

sycl/test-e2e/NewOffloadDriver/split-per-source-main.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// UNSUPPORTED: true
2-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17812
31
// RUN: %{build} -Wno-error=unused-command-line-argument -fsycl-device-code-split=per_source -I %S/Inputs -o %t.out %S/Inputs/split-per-source-second-file.cpp \
42
// RUN: --offload-new-driver -fsycl-dead-args-optimization
53
// RUN: %{run} %t.out

sycl/test-e2e/NewOffloadDriver/sycl-external-with-optional-features.cpp

-2
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
// UNSUPPORTED: true
2-
// UNSUPPORTED-TRACKER: https://github.com/intel/llvm/issues/17812
31
// Test with `--offload-new-driver`
42
// RUN: %{build} -DSOURCE1 --offload-new-driver -c -o %t1.o
53
// RUN: %{build} -DSOURCE2 --offload-new-driver -c -o %t2.o

0 commit comments

Comments
 (0)