Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
3 changes: 2 additions & 1 deletion clang/lib/Driver/Driver.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -6193,7 +6193,8 @@ InputInfo Driver::BuildJobsForActionNoCache(
TI = types::TY_Tempfilelist;
} else if (EffectiveTriple.getSubArch() !=
llvm::Triple::SPIRSubArch_fpga) {
if (UI.DependentOffloadKind == Action::OFK_SYCL) {
if (UI.DependentOffloadKind == Action::OFK_SYCL &&
JA->getType() != types::TY_FPGA_AOCO) {
// Do not add the current info for device with FPGA device. The
// device side isn't used
continue;
Expand Down
12 changes: 12 additions & 0 deletions clang/test/Driver/sycl-offload-static-lib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -150,3 +150,15 @@
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -foffload-static-lib= -c %s 2>&1 \
// RUN: | FileCheck %s -check-prefixes=FOFFLOAD_STATIC_LIB_NOVALUE
// FOFFLOAD_STATIC_LIB_NOVALUE: warning: argument unused during compilation: '-foffload-static-lib='

/// Use of a static archive with various targets should compile and unbundle
// RUN: touch %t.a
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl %t.a -### 2>&1 \
// RUN: | FileCheck %s -check-prefixes=STATIC_ARCHIVE_NO_UNBUNDLE
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64_gen-unknown-unknown-sycldevice %t.a -### 2>&1 \
// RUN: | FileCheck %s -check-prefixes=STATIC_ARCHIVE_NO_UNBUNDLE
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64_fpga-unknown-unknown-sycldevice %t.a -### 2>&1 \
// RUN: | FileCheck %s -check-prefixes=STATIC_ARCHIVE_NO_UNBUNDLE
// RUN: %clangxx -target x86_64-unknown-linux-gnu -fsycl -fsycl-targets=spir64_x86_64-unknown-unknown-sycldevice %t.a -### 2>&1 \
// RUN: | FileCheck %s -check-prefixes=STATIC_ARCHIVE_NO_UNBUNDLE
// STATIC_ARCHIVE_NO_UNBUNDLE: clang-offload-bundler{{.*}}