Skip to content

Commit a2f2473

Browse files
author
Sergey Kanaev
committed
Merge remote-tracking branch 'public/sycl' into private/s-kanaev/assert-abort-impl
2 parents 295ac91 + 6dbefb5 commit a2f2473

File tree

93 files changed

+1453
-4269
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

93 files changed

+1453
-4269
lines changed

CONTRIBUTING.md

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -66,11 +66,6 @@ There are 3 types of tests which are used for DPC++ toolchain validation:
6666
should not have hardware (e.g. GPU, FPGA, etc.) or external software
6767
dependencies (e.g. OpenCL, Level Zero, CUDA runtimes). All tests not following
6868
this approach should be moved to DPC++ end-to-end or SYCL-CTS tests.
69-
However, the tests for a feature under active development requiring atomic
70-
change for tests and product can be put to
71-
[sycl/test/on-device](../../sycl/test/on-device) temporarily. It is developer
72-
responsibility to move the tests to DPC++ E2E test suite or SYCL-CTS once
73-
the feature is stabilized.
7469

7570
**Guidelines for adding DPC++ in-tree LIT tests (DPC++ Clang FE tests)**:
7671
- Use `sycl::` namespace instead of `cl::sycl::`

README.md

Lines changed: 16 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,37 +1,30 @@
11
# Intel Project for LLVM\* technology
22

3-
## Introduction
3+
Intel staging area for llvm.org contribution. Home for Intel LLVM-based projects:
44

5-
Intel staging area for llvm.org contribution.
6-
Home for Intel LLVM-based projects:
5+
## oneAPI Data Parallel C++ compiler
76

8-
* oneAPI Data Parallel C++ compiler - see
9-
[sycl](https://github.com/intel/llvm/tree/sycl) branch. More information on
10-
oneAPI and DPC++ is available at
11-
[https://www.oneapi.com/](https://www.oneapi.com/)
12-
* [![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22)
13-
[![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)
14-
* Late-outline OpenMP\* and OpenMP\* Offload - see
15-
[openmp](https://github.com/intel/llvm/tree/openmp) branch.
7+
[![](https://spec.oneapi.io/oneapi-logo-white-scaled.jpg)](https://www.oneapi.io/)
168

17-
## License
9+
See [sycl](https://github.com/intel/llvm/tree/sycl) branch and
10+
[DPC++ Documentation](https://intel.github.io/llvm-docs/).
1811

19-
See [LICENSE.txt](sycl/LICENSE.TXT) for details.
12+
[![Linux Post Commit Checks](https://github.com/intel/llvm/workflows/Linux%20Post%20Commit%20Checks/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Linux+Post+Commit+Checks%22)
13+
[![Generate Doxygen documentation](https://github.com/intel/llvm/workflows/Generate%20Doxygen%20documentation/badge.svg)](https://github.com/intel/llvm/actions?query=workflow%3A%22Generate+Doxygen+documentation%22)
2014

21-
## Contributing
15+
DPC++ is an open, cross-architecture language built upon the ISO C++ and Khronos
16+
SYCL\* standards. DPC++ extends these standards with a number of extensions,
17+
which can be found in [sycl/doc/extensions](sycl/doc/extensions) directory.
2218

23-
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
19+
## Late-outline OpenMP\* and OpenMP\* Offload
20+
See [openmp](https://github.com/intel/llvm/tree/openmp) branch.
2421

25-
## Sub-projects Documentation
22+
# License
2623

27-
* oneAPI Data Parallel C++ compiler - See
28-
[DPC++ Documentation](https://intel.github.io/llvm-docs/)
29-
* Late-outline OpenMP\* and OpenMP\* Offload - TBD
24+
See [LICENSE.txt](sycl/LICENSE.TXT) for details.
3025

31-
## DPC++ extensions
26+
# Contributing
3227

33-
DPC++ is an open, cross-architecture language built upon the ISO C++ and Khronos
34-
SYCL\* standards. DPC++ extends these standards with a number of extensions,
35-
which can be found in [sycl/doc/extensions](sycl/doc/extensions) directory.
28+
See [CONTRIBUTING.md](CONTRIBUTING.md) for details.
3629

3730
*\*Other names and brands may be claimed as the property of others.*

buildbot/configure.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,9 @@ def do_configure(args):
6161
if args.rocm_platform == 'AMD':
6262
llvm_targets_to_build += ';AMDGPU'
6363
libclc_targets_to_build += ';amdgcn--;amdgcn--amdhsa'
64+
65+
# The ROCm plugin for AMD uses lld for linking
66+
llvm_enable_projects += ';lld'
6467
elif args.rocm_platform == 'NVIDIA' and not args.cuda:
6568
llvm_targets_to_build += ';NVPTX'
6669
libclc_targets_to_build += ';nvptx64--;nvptx64--nvidiacl'

clang/include/clang/Driver/Options.td

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2628,14 +2628,6 @@ def fsycl_device_code_split_EQ : Joined<["-"], "fsycl-device-code-split=">,
26282628
def fsycl_device_code_split : Flag<["-"], "fsycl-device-code-split">, Alias<fsycl_device_code_split_EQ>,
26292629
AliasArgs<["auto"]>, Flags<[CC1Option, CoreOption]>,
26302630
HelpText<"Perform SYCL device code split in the 'auto' mode, i.e. use heuristic to distribute device code across modules">;
2631-
def fsycl_device_code_split_esimd : Flag<["-"], "fsycl-device-code-split-esimd">,
2632-
Flags<[CC1Option, CoreOption]>, HelpText<"Split SYCL and ESIMD kernels into separate modules">;
2633-
def fno_sycl_device_code_split_esimd : Flag<["-"], "fno-sycl-device-code-split-esimd">,
2634-
Flags<[CC1Option, CoreOption]>, HelpText<"Don't split SYCL and ESIMD kernels into separate modules">;
2635-
def fsycl_device_code_lower_esimd : Flag<["-"], "fsycl-device-code-lower-esimd">,
2636-
Flags<[CC1Option, CoreOption]>, HelpText<"Lower ESIMD-specific constructs">;
2637-
def fno_sycl_device_code_lower_esimd : Flag<["-"], "fno-sycl-device-code-lower-esimd">,
2638-
Flags<[CC1Option, CoreOption]>, HelpText<"Do not lower ESIMD-specific constructs">;
26392631
def fsycl_instrument_device_code : Flag<["-"], "fsycl-instrument-device-code">,
26402632
Group<sycl_Group>, Flags<[CC1Option, CoreOption]>,
26412633
HelpText<"Add ITT instrumentation intrinsics calls">,

clang/lib/Driver/Driver.cpp

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2932,6 +2932,18 @@ bool Driver::checkForSYCLDefaultDevice(Compilation &C,
29322932
if (Args.hasArg(options::OPT_fno_sycl_link_spirv))
29332933
return false;
29342934

2935+
// Do not do the check if the default device is passed in -fsycl-targets
2936+
// or if -fsycl-targets isn't passed (that implies default device)
2937+
if (const Arg *A = Args.getLastArg(options::OPT_fsycl_targets_EQ)) {
2938+
for (const char *Val : A->getValues()) {
2939+
llvm::Triple TT(C.getDriver().MakeSYCLDeviceTriple(Val));
2940+
if (TT.isSPIR() && TT.getSubArch() == llvm::Triple::NoSubArch)
2941+
// Default triple found
2942+
return false;
2943+
}
2944+
} else if (!Args.hasArg(options::OPT_fintelfpga))
2945+
return false;
2946+
29352947
SmallVector<const char *, 16> AllArgs(getLinkerArgs(C, Args, true));
29362948
for (StringRef Arg : AllArgs) {
29372949
if (hasSYCLDefaultSection(C, Arg))
@@ -5492,6 +5504,16 @@ void Driver::BuildActions(Compilation &C, DerivedArgList &Args,
54925504
break;
54935505
}
54945506

5507+
// When performing -fsycl based compilations and generating dependency
5508+
// information, perform a specific dependency generation compilation which
5509+
// is not based on the source + footer compilation.
5510+
if (Phase == phases::Preprocess && Args.hasArg(options::OPT_fsycl) &&
5511+
Args.hasArg(options::OPT_M_Group) &&
5512+
!Args.hasArg(options::OPT_fno_sycl_use_footer)) {
5513+
Actions.push_back(
5514+
C.MakeAction<PreprocessJobAction>(Current, types::TY_Dependencies));
5515+
}
5516+
54955517
// FIXME: Should we include any prior module file outputs as inputs of
54965518
// later actions in the same command line?
54975519

@@ -5856,6 +5878,9 @@ void Driver::BuildJobs(Compilation &C) const {
58565878
// we are also generating .o files. So we allow more than one output file in
58575879
// this case as well.
58585880
//
5881+
// Preprocessing job performed for -fsycl enabled compilation specifically
5882+
// for dependency generation (TY_Dependencies)
5883+
//
58595884
if (FinalOutput) {
58605885
unsigned NumOutputs = 0;
58615886
unsigned NumIfsOutputs = 0;
@@ -5866,7 +5891,10 @@ void Driver::BuildJobs(Compilation &C) const {
58665891
A->getKind() == clang::driver::Action::CompileJobClass &&
58675892
0 == NumIfsOutputs++) ||
58685893
(A->getKind() == Action::BindArchClass && A->getInputs().size() &&
5869-
A->getInputs().front()->getKind() == Action::IfsMergeJobClass)))
5894+
A->getInputs().front()->getKind() == Action::IfsMergeJobClass) ||
5895+
(A->getKind() == Action::PreprocessJobClass &&
5896+
A->getType() == types::TY_Dependencies &&
5897+
C.getArgs().hasArg(options::OPT_fsycl))))
58705898
++NumOutputs;
58715899

58725900
if (NumOutputs > 1) {

clang/lib/Driver/ToolChains/Clang.cpp

Lines changed: 14 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1203,6 +1203,12 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
12031203
C.getDriver().addFPGATempDepFile(DepFile, BaseName);
12041204
};
12051205

1206+
// Do not add dependency generation information when compiling the source +
1207+
// footer combination. The dependency generation is done in a separate
1208+
// compile step so we can retain original source information.
1209+
if (ContainsAppendFooterAction(&JA))
1210+
ArgM = nullptr;
1211+
12061212
if (ArgM) {
12071213
// Determine the output location.
12081214
const char *DepFile;
@@ -1216,6 +1222,12 @@ void Clang::AddPreprocessingOptions(Compilation &C, const JobAction &JA,
12161222
DepFile, Clang::getBaseInputName(Args, Inputs[0]));
12171223
} else if (Output.getType() == types::TY_Dependencies) {
12181224
DepFile = Output.getFilename();
1225+
if (!ContainsAppendFooterAction(&JA) && Args.hasArg(options::OPT_fsycl) &&
1226+
!Args.hasArg(options::OPT_fno_sycl_use_footer) &&
1227+
!JA.isDeviceOffloading(Action::OFK_SYCL))
1228+
// Name the dependency file for the specific dependency generation
1229+
// step created for the integration footer enabled compilation.
1230+
DepFile = getDependencyFileName(Args, Inputs);
12191231
} else if (!ArgMD) {
12201232
DepFile = "-";
12211233
} else if (IsIntelFPGA && JA.isDeviceOffloading(Action::OFK_SYCL)) {
@@ -8933,13 +8945,8 @@ void SYCLPostLink::ConstructJob(Compilation &C, const JobAction &JA,
89338945
// Symbol file and specialization constant info generation is mandatory -
89348946
// add options unconditionally
89358947
addArgs(CmdArgs, TCArgs, {"-symbols"});
8936-
// By default we split SYCL and ESIMD kernels into separate modules
8937-
if (TCArgs.hasFlag(options::OPT_fsycl_device_code_split_esimd,
8938-
options::OPT_fno_sycl_device_code_split_esimd, true))
8939-
addArgs(CmdArgs, TCArgs, {"-split-esimd"});
8940-
if (TCArgs.hasFlag(options::OPT_fsycl_device_code_lower_esimd,
8941-
options::OPT_fno_sycl_device_code_lower_esimd, true))
8942-
addArgs(CmdArgs, TCArgs, {"-lower-esimd"});
8948+
addArgs(CmdArgs, TCArgs, {"-split-esimd"});
8949+
addArgs(CmdArgs, TCArgs, {"-lower-esimd"});
89438950
}
89448951
addArgs(CmdArgs, TCArgs,
89458952
{StringRef(getSYCLPostLinkOptimizationLevel(TCArgs))});

clang/test/Driver/sycl-int-footer.cpp

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,3 +67,35 @@
6767
// FOOTER_PATH: append-file{{.*}} "--append=dummy_dir{{(/|\\\\)}}{{.*}}-footer-{{.*}}.h"
6868
// FOOTER_PATH-SAME: "--output=dummy_dir{{(/|\\\\)}}[[APPENDEDSRC:.+\.cpp]]"
6969
// FOOTER_PATH: clang{{.*}} "-x" "c++" "dummy_dir{{(/|\\\\)}}[[APPENDEDSRC]]"
70+
71+
/// Check behaviors for dependency generation
72+
// RUN: %clangxx -fsycl -MD -c %s -### 2>&1 \
73+
// RUN: | FileCheck -check-prefix DEP_GEN %s
74+
// DEP_GEN: clang{{.*}} "-Eonly"
75+
// DEP_GEN-SAME: "-dependency-file"
76+
// DEP_GEN-SAME: "-MT"
77+
// DEP_GEN-SAME: "-x" "c++" "[[INPUTFILE:.+\.cpp]]"
78+
// DEP_GEN: append-file{{.*}} "[[INPUTFILE]]"
79+
// DEP_GEN-NOT: clang{{.*}} "-dependency-file"
80+
81+
/// Dependency generation phases
82+
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -MD -c %s -ccc-print-phases 2>&1 \
83+
// RUN: | FileCheck -check-prefix DEP_GEN_PHASES %s
84+
// DEP_GEN_PHASES: 0: input, "[[INPUTFILE:.+\.cpp]]", c++, (host-sycl)
85+
// DEP_GEN_PHASES: 1: preprocessor, {0}, dependencies
86+
// DEP_GEN_PHASES: 2: input, "[[INPUTFILE]]", c++, (device-sycl)
87+
// DEP_GEN_PHASES: 3: preprocessor, {2}, c++-cpp-output, (device-sycl)
88+
// DEP_GEN_PHASES: 4: compiler, {3}, ir, (device-sycl)
89+
// DEP_GEN_PHASES: 5: offload, "device-sycl (spir64-unknown-unknown-sycldevice)" {4}, ir
90+
// DEP_GEN_PHASES: 6: append-footer, {0}, c++, (host-sycl)
91+
// DEP_GEN_PHASES: 7: preprocessor, {6}, c++-cpp-output, (host-sycl)
92+
// DEP_GEN_PHASES: 8: offload, "host-sycl (x86_64-unknown-linux-gnu)" {7}, "device-sycl (spir64-unknown-unknown-sycldevice)" {4}, c++-cpp-output
93+
// DEP_GEN_PHASES: 9: compiler, {8}, ir, (host-sycl)
94+
// DEP_GEN_PHASES: 10: backend, {9}, assembler, (host-sycl)
95+
// DEP_GEN_PHASES: 11: assembler, {10}, object, (host-sycl)
96+
// DEP_GEN_PHASES: 12: clang-offload-bundler, {5, 11}, object, (host-sycl)
97+
98+
/// Allow for -o and preprocessing
99+
// RUN: %clangxx -fsycl -MD -c %s -o dummy -### 2>&1 \
100+
// RUN: | FileCheck -check-prefix DEP_GEN_OUT_ERROR %s
101+
// DEP_GEN_OUT_ERROR-NOT: cannot specify -o when generating multiple output files

clang/test/Driver/sycl-offload-intelfpga.cpp

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -322,11 +322,11 @@
322322
/// -fintelfpga dependency file check with host .d enabled
323323
// RUN: %clangxx -### -MMD -fsycl -fintelfpga -Xshardware %t-1.cpp %t-2.cpp 2>&1 \
324324
// RUN: | FileCheck -check-prefix=CHK-FPGA-DEP-FILES-HOST %s
325-
// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-dependency-file" "[[INPUT1:.+\.d]]" "-MT" "{{.*}}.o"
326-
// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-dependency-file" "[[INPUT2:.+\.d]]" "-MT" "{{.*}}.o"
325+
// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-triple" "spir64_fpga-unknown-unknown-sycldevice"{{.*}} "-dependency-file" "[[INPUT1:.+\.d]]" "-MT" "{{.*}}.o"
326+
// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-triple" "spir64_fpga-unknown-unknown-sycldevice"{{.*}} "-dependency-file" "[[INPUT2:.+\.d]]" "-MT" "{{.*}}.o"
327327
// CHK-FPGA-DEP-FILES-HOST: aoc{{.*}} "-dep-files={{.*}}[[INPUT1]],{{.*}}[[INPUT2]]"
328-
// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-fsycl-is-host"{{.*}} "-dependency-file"
329-
// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-fsycl-is-host"{{.*}} "-dependency-file"
328+
// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-fsycl-is-host"{{.*}}
329+
// CHK-FPGA-DEP-FILES-HOST: clang{{.*}} "-fsycl-is-host"{{.*}}
330330

331331
/// -fintelfpga dependency file generation test to object
332332
// RUN: %clangxx -### -fsycl -fintelfpga -target x86_64-unknown-linux-gnu %t-1.cpp %t-2.cpp -c 2>&1 \
@@ -348,7 +348,7 @@
348348
// RUN: | FileCheck -check-prefixes=CHK-FPGA-DEP-FILES3,CHK-FPGA-DEP-FILES3-LIN %s
349349
// RUN: %clang_cl -### --target=x86_64-pc-windows-msvc -fsycl -fintelfpga %t-1.cpp -c -Fodummy.obj 2>&1 \
350350
// RUN: | FileCheck -check-prefixes=CHK-FPGA-DEP-FILES3,CHK-FPGA-DEP-FILES3-WIN %s
351-
// CHK-FPGA-DEP-FILES3: clang{{.*}} "-dependency-file" "[[OUTPUT:.+\.d]]"
351+
// CHK-FPGA-DEP-FILES3: clang{{.*}} "-triple" "spir64_fpga-unknown-unknown-sycldevice"{{.*}} "-dependency-file" "[[OUTPUT:.+\.d]]"
352352
// CHK-FPGA-DEP-FILES3-LIN: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64_fpga-unknown-unknown-sycldevice,host-x86_64-unknown-linux-gnu,sycl-fpga_dep" {{.*}} "-inputs={{.*}}.bc,{{.*}}.o,[[OUTPUT]]"
353353
// CHK-FPGA-DEP-FILES3-WIN: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64_fpga-unknown-unknown-sycldevice,host-x86_64-pc-windows-msvc,sycl-fpga_dep" {{.*}} "-inputs={{.*}}.bc,{{.*}}.obj,[[OUTPUT]]"
354354

clang/test/Driver/sycl-offload-with-split.c

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -299,25 +299,15 @@
299299
// Check ESIMD device code split.
300300
// RUN: %clang -### -fsycl %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT
301301
// RUN: %clang_cl -### -fsycl %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT
302-
// RUN: %clang -### -fsycl -fsycl-device-code-split-esimd %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT
303-
// RUN: %clang_cl -### -fsycl -fsycl-device-code-split-esimd %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT
304-
// RUN: %clang -### -fsycl -fno-sycl-device-code-split-esimd %s 2>&1 | FileCheck %s -check-prefixes=CHK-NO-ESIMD-SPLIT
305-
// RUN: %clang_cl -### -fsycl -fno-sycl-device-code-split-esimd %s 2>&1 | FileCheck %s -check-prefixes=CHK-NO-ESIMD-SPLIT
306302
// RUN: %clang -### -fsycl -fintelfpga %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT
307303
// RUN: %clang -### -fsycl -fsycl-targets=spir64_fpga-unknown-unknown-sycldevice %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT
308304
// RUN: %clang_cl -### -fsycl -fintelfpga %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-SPLIT
309305
// CHK-ESIMD-SPLIT: sycl-post-link{{.*}} "-split-esimd"
310-
// CHK-NO-ESIMD-SPLIT-NOT: sycl-post-link{{.*}} "-split-esimd"
311306

312307
// Check lowering of ESIMD device code.
313308
// RUN: %clang -### -fsycl %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER
314309
// RUN: %clang_cl -### -fsycl %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER
315-
// RUN: %clang -### -fsycl -fsycl-device-code-lower-esimd %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER
316-
// RUN: %clang_cl -### -fsycl -fsycl-device-code-lower-esimd %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER
317-
// RUN: %clang -### -fsycl -fno-sycl-device-code-lower-esimd %s 2>&1 | FileCheck %s -check-prefixes=CHK-NO-ESIMD-LOWER
318-
// RUN: %clang_cl -### -fsycl -fno-sycl-device-code-lower-esimd %s 2>&1 | FileCheck %s -check-prefixes=CHK-NO-ESIMD-LOWER
319310
// RUN: %clang -### -fsycl -fintelfpga %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER
320311
// RUN: %clang -### -fsycl -fsycl-targets=spir64_fpga-unknown-unknown-sycldevice %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER
321312
// RUN: %clang_cl -### -fsycl -fintelfpga %s 2>&1 | FileCheck %s -check-prefixes=CHK-ESIMD-LOWER
322313
// CHK-ESIMD-LOWER: sycl-post-link{{.*}} "-lower-esimd"
323-
// CHK-NO-ESIMD-LOWER-NOT: sycl-post-link{{.*}} "-lower-esimd"

clang/test/Driver/sycl-offload.cpp

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -96,3 +96,10 @@
9696
// RUN: | FileCheck -check-prefix NO_IMPLIED_DEVICE %s
9797
// NO_IMPLIED_DEVICE: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-spir64-unknown-unknown-sycldevice"{{.*}} "-check-section"
9898
// NO_IMPLIED_DEVICE-NOT: clang-offload-bundler{{.*}} "-targets={{.*}}spir64-unknown-unknown-sycldevice{{.*}}" "-unbundle"
99+
100+
/// Passing in the default triple should allow for -Xsycl-target options
101+
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64 -Xsycl-target-backend=spir64 -DFOO -Xsycl-target-linker=spir64 -DFOO2 %S/Inputs/SYCL/objlin64.o 2>&1 \
102+
// RUN: | FileCheck -check-prefixes=SYCL_TARGET_OPT %s
103+
// RUN: %clangxx -### -target x86_64-unknown-linux-gnu -fsycl -Xsycl-target-backend=spir64 -DFOO -Xsycl-target-linker=spir64 -DFOO2 %S/Inputs/SYCL/objlin64.o 2>&1 \
104+
// RUN: | FileCheck -check-prefixes=SYCL_TARGET_OPT %s
105+
// SYCL_TARGET_OPT: clang-offload-wrapper{{.*}} "-compile-opts=-DFOO" "-link-opts=-DFOO2"

0 commit comments

Comments
 (0)