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: 2 additions & 2 deletions clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -1821,8 +1821,8 @@ def fsycl_link_targets_EQ : CommaJoined<["-"], "fsycl-link-targets=">, Flags<[Dr
HelpText<"Specify comma-separated list of triples SYCL offloading targets to produce linked device images">;
def fsycl_device_code_split_EQ : Joined<["-"], "fsycl-device-code-split=">,
Flags<[CC1Option, CoreOption]>, HelpText<"Perform SYCL device code split: per_kernel (device code module is "
"created for each SYCL kernel) | per_source (device code module is created for each source (translation unit)). "
"Default is no device code split - all kernels go into a single module`">, Values<"per_source,per_kernel">;
"created for each SYCL kernel) | per_source (device code module is created for each source (translation unit)) | off (no device code split). "
"Default is 'off' - all kernels go into a single module`">, Values<"per_source, per_kernel, off">;
def fsycl_device_code_split : Flag<["-"], "fsycl-device-code-split">, Alias<fsycl_device_code_split_EQ>,
AliasArgs<["per_source"]>, Flags<[CC1Option, CoreOption]>,
HelpText<"Perform SYCL device code split in the per_source mode i.e. create a device code module for each source (translation unit)">;
Expand Down
5 changes: 4 additions & 1 deletion clang/lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -3575,7 +3575,10 @@ class OffloadingActionBuilder final {
Arg *SYCLLinkTargets = Args.getLastArg(
options::OPT_fsycl_link_targets_EQ);
WrapDeviceOnlyBinary = Args.hasArg(options::OPT_fsycl_link_EQ);
DeviceCodeSplit = Args.hasArg(options::OPT_fsycl_device_code_split);
auto *DeviceCodeSplitArg =
Args.getLastArg(options::OPT_fsycl_device_code_split_EQ);
DeviceCodeSplit = DeviceCodeSplitArg &&
DeviceCodeSplitArg->getValue() != StringRef("off");
// Device only compilation for -fsycl-link (no FPGA) and
// -fsycl-link-targets
CompileDeviceOnly =
Expand Down
Loading