Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

#15274 breaks support for configuration files #15319

Closed
hvdijk opened this issue Sep 6, 2024 · 0 comments · Fixed by #15328
Closed

#15274 breaks support for configuration files #15319

hvdijk opened this issue Sep 6, 2024 · 0 comments · Fixed by #15328
Labels
bug Something isn't working

Comments

@hvdijk
Copy link
Contributor

hvdijk commented Sep 6, 2024

Describe the bug

When configuration files are used, Clang internally updates the argument list according to the configuration file, but in that process it canonicalizes option spellings. #15274 makes two options aliases except it then checks for the exact spelling that is used to distinguish between them. Naturally, that breaks.

To reproduce

  1. Configure DPC++ on Linux. Include NativeCPU for easy reproduction.
  2. Drop an empty x86_64-unknown-linux-gnu.cfg in the bin directory.
  3. Try to generate lib/libsycl-nativecpu_utils.bc: ninja -v lib/libsycl-nativecpu_utils.bc

Expected: success
Actual:

FAILED: lib/libsycl-nativecpu_utils.bc /home/harald/dpcppllvm/build/x86_64-linux/lib/libsycl-nativecpu_utils.bc
cd /home/harald/dpcppllvm/build/x86_64-linux/tools/libdevice && /home/harald/dpcppllvm/build/x86_64-linux/bin/clang-20 -I /home/harald/dpcppllvm/build/x86_64-linux/include/sycl -I /home/harald/dpcppllvm/build/x86_64-linux/include -Wno-sycl-strict -Wno-undefined-internal -sycl-std=2020 -I /home/harald/dpcppllvm/build/x86_64-linux/_deps/unified-runtime-src/source/adapters/native_cpu -fsycl-targets=native_cpu -fsycl-device-only -fsycl-device-obj=llvmir /home/harald/dpcppllvm/libdevice/nativecpu_utils.cpp -o /home/harald/dpcppllvm/build/x86_64-linux/./lib/libsycl-nativecpu_utils.bc
clang-20: error: '-fsycl-targets' must be used in conjunction with '-fsycl' to enable offloading
ninja: build stopped: subcommand failed.

Environment

  • OS: Linux
  • Target device and vendor: N/A
  • DPC++ version: f5cb3bc
  • Dependencies version: N/A

Additional context

No response

@hvdijk hvdijk added the bug Something isn't working label Sep 6, 2024
hvdijk added a commit to hvdijk/dpcppllvm that referenced this issue Sep 9, 2024
…and some cleanup (intel#15274)"

This partially reverts commit fd4b409,
undoing the change to alias -fsycl-device-only and
--offload-device-only but keeping the other cleanups, and adds a test
showing why the alias does not work.

Fixes intel#15319
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant