Skip to content

Commit 8257fbd

Browse files
code clean up and resolve CI failure
1 parent 1333b09 commit 8257fbd

File tree

4 files changed

+11
-10
lines changed

4 files changed

+11
-10
lines changed

clang/lib/Driver/Driver.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1556,9 +1556,9 @@ static void appendOneArg(InputArgList &Args, const Arg *Opt) {
15561556
}
15571557
}
15581558

1559-
/// Utility function to parse all devices passed via -fsycl-targets.
1560-
/// Return 'true' for JIT, AOT Intel CPU/GPUs and NVidia/AMD targets.
1561-
/// Otherwise return 'false'.
1559+
// Utility function to parse all devices passed via -fsycl-targets.
1560+
// Return 'true' for JIT, AOT Intel CPU/GPUs and NVidia/AMD targets.
1561+
// Otherwise return 'false'.
15621562
bool Driver::GetUseNewOffloadDriverForSYCLOffload(Compilation &C,
15631563
const ArgList &Args) const {
15641564
// Check only if enabled with -fsycl

clang/lib/Driver/ToolChains/SYCL.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -700,7 +700,7 @@ getDeviceLibrariesLegacy(const Compilation &C, const llvm::Triple &TargetTriple,
700700
StringRef LibSuffix = ".bc";
701701
if (IsNewOffload)
702702
// For new offload model, we use packaged .bc files.
703-
LibSuffix = IsWindowsMSVCEnv ? ".new.obj" : ".new.o";
703+
LibSuffix = IsWindowsMSVCEnv ? ".obj" : ".o";
704704
auto addLibraries = [&](const SYCLDeviceLibsList &LibsList) {
705705
for (const DeviceLibOptInfo &Lib : LibsList) {
706706
if (!DeviceLibLinkInfo[Lib.DeviceLibOption])
@@ -807,7 +807,7 @@ SYCL::getDeviceLibraries(const Compilation &C, const llvm::Triple &TargetTriple,
807807
StringRef LibSuffix = ".bc";
808808
if (IsNewOffload)
809809
// For new offload model, we use packaged .bc files.
810-
LibSuffix = IsWindowsMSVCEnv ? ".new.obj" : ".new.o";
810+
LibSuffix = IsWindowsMSVCEnv ? ".obj" : ".o";
811811
auto addLibraries = [&](const SYCLDeviceLibsList &LibsList) {
812812
for (const StringRef &Lib : LibsList) {
813813
LibraryList.push_back(Args.MakeArgString(Twine(Lib) + LibSuffix));
@@ -1024,10 +1024,10 @@ const char *SYCL::Linker::constructLLVMLinkCommand(
10241024
const bool IsSYCLNativeCPU =
10251025
this->getToolChain().getTriple().isNativeCPU();
10261026
StringRef LibPostfix = ".bc";
1027-
StringRef NewLibPostfix = ".new.o";
1027+
StringRef NewLibPostfix = ".o";
10281028
if (HostTC->getTriple().isWindowsMSVCEnvironment() &&
10291029
C.getDriver().IsCLMode())
1030-
NewLibPostfix = ".new.obj";
1030+
NewLibPostfix = ".obj";
10311031
std::string FileName = this->getToolChain().getInputFilename(II);
10321032
StringRef InputFilename = llvm::sys::path::filename(FileName);
10331033
// NativeCPU links against libclc (libspirv)

sycl/test-e2e/Config/kernel_from_file.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,8 @@
1515
// RUN: %clangxx -Wno-error=ignored-attributes %sycl_include -DSYCL_DISABLE_FALLBACK_ASSERT %cxx_std_optionc++17 %include_option %t.h %s -o %t.out %sycl_options -Xclang -verify-ignore-unexpected=note,warning %if preview-mode %{-Wno-unused-command-line-argument%}
1616
// RUN: env SYCL_USE_KERNEL_SPV=%t.spv %{run} %t.out
1717

18-
// Check backward compatibility: verify that SYCL object files can be unbundled to extract device code as in old-offloading-model workflows.
18+
// Check backward compatibility: verify that SYCL object files can be unbundled
19+
// to extract device code as in old-offloading-model workflows.
1920
// >> ---- unbundle compiler wrapper and asan device objects
2021
// RUN: clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-itt-compiler-wrappers.old%obj_ext -output=%t_compiler_wrappers.old.bc -unbundle
2122
// RUN: %if linux %{ clang-offload-bundler -type=o -targets=sycl-spir64-unknown-unknown -input=%sycl_static_libs_dir/libsycl-asan.old%obj_ext -output=%t_asan.old.bc -unbundle %}
@@ -27,7 +28,6 @@
2728
// RUN: llvm-spirv -o %t.old.spv %t_app.old.bc
2829
// RUN: env SYCL_USE_KERNEL_SPV=%t.old.spv %{run} %t.out
2930

30-
3131
#include <iostream>
3232
#include <sycl/detail/core.hpp>
3333

sycl/test-e2e/SeparateCompile/test.cpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -37,7 +37,8 @@
3737
// RUN: %clangxx wrapper.o a.o b.o -Wno-unused-command-line-argument -o app.exe %sycl_options
3838
// RUN: %{run} ./app.exe
3939

40-
// Check backward compatibility: verify that SYCL object files can be unbundled to extract device code as in old-offloading-model workflows.
40+
// Check backward compatibility: verify that SYCL object files can be unbundled
41+
// to extract device code as in old-offloading-model workflows.
4142
// >> ---- bundle .o with .spv
4243
// >> run bundler
4344
// RUN: clang-offload-bundler -type=o -targets=host-x86_64,sycl-spir64-pc-linux-gnu -input=a.o -input=a_kernel.bc -output=a_fat.old.o

0 commit comments

Comments
 (0)