Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions clang/lib/Driver/ToolChains/Linux.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -895,10 +895,6 @@ void Linux::addOffloadRTLibs(unsigned ActiveKinds, const ArgList &Args,
llvm::SmallVector<std::pair<StringRef, StringRef>> Libraries;
if (ActiveKinds & Action::OFK_HIP)
Libraries.emplace_back(RocmInstallation->getLibPath(), "libamdhip64.so");
else if ((ActiveKinds & Action::OFK_SYCL) &&
!Args.hasArg(options::OPT_nolibsycl))
Libraries.emplace_back(SYCLInstallation->getSYCLRTLibPath(),
"libsycl.so");

for (auto [Path, Library] : Libraries) {
if (Args.hasFlag(options::OPT_frtlib_add_rpath,
Expand Down
6 changes: 3 additions & 3 deletions clang/test/Driver/sycl-offload-jit.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -29,13 +29,13 @@
// CHK-DEVICE-TRIPLE-SAME: "-O2"
// CHK-DEVICE-TRIPLE: llvm-offload-binary{{.*}} "--image=file={{.*}}.bc,triple=spir64-unknown-unknown,arch=generic,kind=sycl{{.*}}"

// Check if path to libsycl.so is passed to clang-linker-wrapper tool by default for SYCL compilation.
// Check that path to libsycl.so is not passed to clang-linker-wrapper tool by default for SYCL compilation, but that -lsycl is.
// The test also checks if SYCL header include paths are added to the SYCL host and device compilation.
// INTEL-RUN: %clang --offload-new-driver --sysroot=%S/Inputs/SYCL -### --target=x86_64-unknown-linux-gnu -fsycl %s 2>&1 \
// RUN: | FileCheck -check-prefixes=CHECK-LSYCL,CHECK-SYCL-HEADERS-HOST,CHECK-SYCL-HEADERS-DEVICE %s
// RUN: | FileCheck -implicit-check-not="libsycl.so" -check-prefixes=CHECK-LSYCL,CHECK-SYCL-HEADERS-HOST,CHECK-SYCL-HEADERS-DEVICE %s
// CHECK-SYCL-HEADERS-DEVICE: "-fsycl-is-device"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"
// CHECK-SYCL-HEADERS-HOST: "-fsycl-is-host"{{.*}} "-internal-isystem" "{{.*}}bin{{[/\\]+}}..{{[/\\]+}}include"
// CHECK-LSYCL: clang-linker-wrapper{{.*}} "{{.*}}libsycl.so"
// CHECK-LSYCL: "-lsycl"
// Check that -fsycl -fno-sycl does not pass libsycl.so to the linker.
// RUN: %clang -### --target=x86_64-unknown-linux-gnu -fsycl -fno-sycl %s 2>&1 \
// RUN: | FileCheck -check-prefix=CHECK-NO-SYCL-RT %s
Expand Down
Loading