File tree Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Expand file tree Collapse file tree 2 files changed +16
-1
lines changed Original file line number Diff line number Diff line change @@ -1219,7 +1219,7 @@ llvm::opt::DerivedArgList *ToolChain::TranslateOffloadTargetArgs(
1219
1219
A->getOption ().matches (options::OPT_Xsycl_frontend);
1220
1220
if (A->getOption ().matches (options::OPT_Xsycl_frontend_EQ)) {
1221
1221
// Passing device args: -Xsycl-target-frontend=<triple> -opt=val.
1222
- if (A->getValue (0 ) == getTripleString ())
1222
+ if (getDriver (). MakeSYCLDeviceTriple ( A->getValue (0 )) == getTriple ())
1223
1223
Index = Args.getBaseArgs ().MakeIndex (A->getValue (1 ));
1224
1224
else
1225
1225
continue ;
Original file line number Diff line number Diff line change 171
171
172
172
/// ###########################################################################
173
173
174
+ /// Check -Xsycl-target-frontend= accepts triple aliases
175
+ // RUN: %clang -### -fsycl -fsycl-targets=spir64 -Xsycl-target-frontend=spir64 -DFOO %s 2>&1 \
176
+ // RUN: | FileCheck -DARCH=spir64 -check-prefixes=CHK-UNUSED-ARG-WARNING,CHK-TARGET %s
177
+ // RUN: %clang -### -fsycl -fsycl-targets=spir64_x86_64 -Xsycl-target-frontend=spir64_x86_64 -DFOO %s 2>&1 \
178
+ // RUN: | FileCheck -DARCH=spir64_x86_64 -check-prefixes=CHK-UNUSED-ARG-WARNING,CHK-TARGET %s
179
+ // RUN: %clang -### -fsycl -fsycl-targets=spir64_gen -Xsycl-target-frontend=spir64_gen -DFOO %s 2>&1 \
180
+ // RUN: | FileCheck -DARCH=spir64_gen -check-prefixes=CHK-UNUSED-ARG-WARNING,CHK-TARGET %s
181
+ // RUN: %clang -### -fsycl -fsycl-targets=spir64_fpga -Xsycl-target-frontend=spir64_fpga -DFOO %s 2>&1 \
182
+ // RUN: | FileCheck -DARCH=spir64_fpga -check-prefixes=CHK-UNUSED-ARG-WARNING,CHK-TARGET %s
183
+ // CHK-UNUSED-ARG-WARNING-NOT: clang{{.*}} warning: argument unused during compilation: '-Xsycl-target-frontend={{.*}} -DFOO'
184
+ // CHK-TARGET: clang{{.*}} "-cc1" "-triple" "[[ARCH]]-unknown-unknown"{{.*}} "-D" "FOO"
185
+ // CHK-TARGET: clang-offload-bundler{{.*}} "-type=o" "-targets=sycl-[[ARCH]]-unknown-unknown"
186
+
187
+ /// ###########################################################################
188
+
174
189
/// Check the phases graph when using a single target, different from the host.
175
190
/// We should have an offload action joining the host compile and device
176
191
/// preprocessor and another one joining the device linking outputs to the host
You can’t perform that action at this time.
0 commit comments