Repository navigation
Conversation
test Signed-off-by: jinge90 <ge.jin@intel.com>
There was a problem hiding this comment.
🟢 Approval recommended
The focused test-only changes preserve existing assertions, with only a non-blocking comment typo remaining.
1 open issue
What changed in this PR
This PR updates SYCL no-RDC fat-archive driver tests to use simulated compiler installations for tool and device-library lookup.
Changes:
- Replace
--sysrootwith-ccc-install-dirin phase-check commands. - Populate temporary installations with the offload bundler and dummy device libraries, using copies on Windows and symlinks for the old-model test.
- Preserve existing phase assertions.
| File | Description |
|---|---|
| clang/test/Driver/sycl-no-rdc-fat-archive-win.cpp | Creates a temporary Windows installation and updates Clang and clang-cl invocations. |
| clang/test/Driver/sycl-no-rdc-fat-archive-old-model.cpp | Creates a symlink-based installation and updates old-driver invocations. |
Review effort: Balanced
|
Hi, @mdtoguchi |
| /// all dummy devicelib files. | ||
| // RUN: rm -rf %t && mkdir -p %t/bin | ||
| // RUN: ln -s %/S/Inputs/SYCL/lib %t/lib | ||
| // RUN: ln -s %llvmshlibdir/../bin/clang-offload-bundler %t/bin/clang-offload-bundler |
There was a problem hiding this comment.
is the bundler guaranteed to be built with a 'clang only' build?
There was a problem hiding this comment.
Hi, @mdtoguchi
No, if we run "ninja clang", only following tools are built:
clang-24 clang-offload-deps clang-offload-extract clang-offload-wrapper clang-tblgen llvm-lit
llvm-min-tblgen llvm-tblgen
Previously, clang also have dependencies on clang-offload-bundler, there is a commit to remove it:
commit 326c135
Author: Chris Bieneman chris.bieneman@me.com
Date: Fri Mar 10 10:40:19 2023 -0600
[NFC] [CMake] Cleanup clang tool dependencies
None of these tools need to depend on clang to build, instead the test
target should depend on them.
This prevents rebuilding/linking these tools when building the `clang`
target directly.
Current, driver code has assumptions that clang-offload-bunder and offload-arch should be placed into D.Dir:
https://github.com/intel/llvm/blob/sycl/clang/lib/Driver/Driver.cpp#L4011
Thanks very much.
There was a problem hiding this comment.
If there is no guarantee that clang-offload-bundler will be present with a clang only build, there should be a REQUIRES dependency so the symlink doesn't fail.

When replacing '--sysroot' with '-ccc-install-dir' in no-rdc-fat-archive test, driver reports error that 'clang-offload-bundler' can't be found. Driver tries to launch clang-offload-bundler from the directory specified with '-ccc-install-dir' and leads to this error. We follow the approach from sycl-offload-jit-unix.cpp to create a simulated installation dir in '%t' and create symlink for clang-offload-bundler and dummy devicelib files there. For Windows target, we follow https://github.com/intel/llvm/blob/sycl/clang/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp approach to copy dummy devicelibs and clang-offload-bundler tool to simulated installation dir.