Skip to content

Conversation

@wenju-he
Copy link
Contributor

@wenju-he wenju-he commented Nov 20, 2025

Restore pulldown omissions:

  • Restore output layout from df74736: build/lib/clc -> build/lib/clang/<LLVM_VERSION>/lib/libclc
  • Restore standalone build LIBCLC_INSTALL_DIR from b9e2f7a.

Additional changes:

  • Remove repeated directory creation for LIBCLC_OUTPUT_LIBRARY_DIR.
  • Install libspirv remangled-* bitcodes into LIBCLC_INSTALL_DIR.
  • SYCLInstallationDetector findLibspirvPath is now simplifed.
  • Updated libspirv path in sycl-jit/jit-compiler.

…e dir

Restore pulldown omissions:
* Restore output layout from df74736:
  build/lib/clc -> build/lib/clang/<LLVM_VERSION>/lib/libclc
* Restore standalone build LIBCLC_INSTALL_DIR from b9e2f7a.

Additional changes:
* Remove repeated directory creation for LIBCLC_OUTPUT_LIBRARY_DIR.
* Install libspirv remangled-* bitcodes into LIBCLC_INSTALL_DIR.
* SYCLInstallationDetector findLibspirvPath is now simplifed.
Copy link
Contributor

@Maetveis Maetveis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Driver and driver test changes LGTM with some nits. I haven't checked CMake changes, that's mostly coming from upstream right?

// RUN: %clang -### -resource-dir %{resource_dir} -fsycl -fsycl-targets=nvptx64-nvidia-cuda -nocudalib -target x86_64-unknown-linux-gnu %s 2>&1 \
// RUN: | FileCheck %s -DRESOURCE_DIR=%{resource_dir} --check-prefixes=CHECK-LINUX
// RUN: %clang -### -resource-dir %{resource_dir} -fsycl -fsycl-targets=nvptx64-nvidia-cuda -nocudalib -target x86_64-unknown-windows-cygnus %s 2>&1 \
// RUN: | FileCheck %s -DRESOURCE_DIR=%{resource_dir} --check-prefixes=CHECK-LINUX
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too the same as in #20701 (comment)

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

here too the same as in #20701 (comment)

done

Comment on lines 835 to 836
Driver D{(SYCLToolchain::instance().getPrefix() + "/bin/clang++").str(),
T.getTriple(), Diags};
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is getClangXXExe:

std::string_view getPrefix() const { return Prefix; }
std::string_view getClangXXExe() const { return ClangXXExe; }

I understand this is a move, but we can update it still.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is getClangXXExe:

std::string_view getPrefix() const { return Prefix; }
std::string_view getClangXXExe() const { return ClangXXExe; }

I understand this is a move, but we can update it still.

done, updated to use getClangXXExe

(SYCLToolchain::instance().getPrefix() + "/lib/" + LibName).str();
std::string LibPath;
if (LibName.find("libspirv") != std::string::npos) {
SmallString<256> LibraryPath(D.ResourceDir);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, resource dir getter should go to the SYCLToolchain class, maybe it should be even pre-computed and stored as a data member.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

IMO, resource dir getter should go to the SYCLToolchain class, maybe it should be even pre-computed and stored as a data member.

done, moved to a data member of SYCLToolchain

std::string LibPath;
if (LibName.find("libspirv") != std::string::npos) {
SmallString<256> LibraryPath(D.ResourceDir);
sys::path::append(LibraryPath, "lib", "libclc", LibName);
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we use sys::path::append in this file (probably erroneously), but can we use simple string concatenation for uniformity?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we use sys::path::append in this file (probably erroneously), but can we use simple string concatenation for uniformity?

done

Copy link
Contributor

@aelovikov-intel aelovikov-intel left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

sycl-jit LGTM, thanks!

@wenju-he
Copy link
Contributor Author

kindly ping @intel/dpcpp-clang-driver-reviewers for review

Copy link
Contributor

@srividya-sundaram srividya-sundaram left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Driver changes LGTM

@wenju-he
Copy link
Contributor Author

wenju-he commented Dec 2, 2025

@intel/llvm-gatekeepers please merge, thanks

@steffenlarsen steffenlarsen merged commit 81d32f5 into intel:sycl Dec 2, 2025
32 of 34 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants