-
Notifications
You must be signed in to change notification settings - Fork 834
[SYCL][ClangLinkerWrapper] Remove -sycl-device-libraries option #21945
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,18 +1,15 @@ | ||
| // Generate .o file as SYCL device library file. | ||
| // Generate .bc file as SYCL device library file. | ||
| // REQUIRES: system-linux | ||
| // | ||
| // RUN: touch %t.devicelib.cpp | ||
| // RUN: %clang %t.devicelib.cpp -fsycl -fsycl-targets=spir64-unknown-unknown -c --offload-new-driver -o %t_1.devicelib.o | ||
| // RUN: %clang %t.devicelib.cpp -fsycl -fsycl-targets=spir64_gen-unknown-unknown -c --offload-new-driver -o %t_2.devicelib.o | ||
| // RUN: %clang %t.devicelib.cpp -fsycl -fsycl-targets=spir64_x86_64-unknown-unknown -c --offload-new-driver -o %t_3.devicelib.o | ||
| // RUN: touch %t.devicelib.bc | ||
|
|
||
| // Test for default llvm-spirv options | ||
|
|
||
| // RUN: %clang -target x86_64-unknown-linux-gnu -fsycl --offload-new-driver \ | ||
| // RUN: -fsycl-targets=spir64-unknown-unknown -c %s -o %t_1.o | ||
| // RUN: clang-linker-wrapper -sycl-device-libraries=%t_1.devicelib.o \ | ||
| // RUN: -fsycl-targets=spir64-unknown-unknown -c %s -o %t.o | ||
| // RUN: clang-linker-wrapper --bitcode-library=spir64-unknown-unknown=%t.devicelib.bc \ | ||
| // RUN: "--host-triple=x86_64-unknown-linux-gnu" "--linker-path=/usr/bin/ld" \ | ||
| // RUN: "--" "-o" "a.out" %t_1.o --dry-run 2>&1 | FileCheck %s | ||
| // RUN: "--" "-o" "a.out" %t.o --dry-run 2>&1 | FileCheck %s | ||
|
|
||
| // CHECK: llvm-spirv{{.*}}-spirv-debug-info-version=nonsemantic-shader-200 | ||
| // CHECK-NOT: ocl-100 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -159,9 +159,6 @@ def libpath : Joined<["/", "-", "/?", "-?"], "libpath:">, Flags<[HelpHidden]>; | |
| def wholearchive_flag : Joined<["/", "-", "/?", "-?"], "wholearchive">, Flags<[HelpHidden]>; | ||
|
|
||
| // Options to specify SYCL device library files | ||
| def sycl_device_lib_EQ : CommaJoined<["--", "-"], "sycl-device-libraries=">, | ||
| Flags<[WrapperOnlyOption]>, | ||
| HelpText<"A comma separated list of device libraries that are linked during the device link.">; | ||
| def sycl_device_library_location_EQ : Joined<["--", "-"], | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nit (not necessarily for this PR) - just wondering why this option is still needed and if it is an opportunity for more clean up.
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. For now, this option is needed as there is a native_cpu dependency on this one. I'm working on alleviating this dependency in a separate PR. |
||
| "sycl-device-library-location=">, Flags<[WrapperOnlyOption]>, | ||
| HelpText<"Location of SYCL device library files">; | ||
|
|
||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only the unused device library extraction code was removed. The general fat object extraction logic remains in place for processing user input files/libraries.
What was removed was the old device-library-specific extraction path in
sycl::linkDevice(), since fat object device libraries (libsycl-*.new.o) no longer exist and device libraries are now passed directly as.bcfiles via--bitcode-library=