Skip to content

[Driver][SYCL] Disable the warning when fsycl-host-compiler is used #5124

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

Merged
merged 4 commits into from
Dec 17, 2021
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
2 changes: 1 addition & 1 deletion clang/include/clang/Driver/Options.td
Original file line number Diff line number Diff line change
Expand Up @@ -2699,7 +2699,7 @@ def fsycl_libspirv_path_EQ : Joined<["-"], "fsycl-libspirv-path=">,
Flags<[CC1Option, CoreOption]>, HelpText<"Path to libspirv library">;
def fno_sycl_libspirv : Flag<["-"], "fno-sycl-libspirv">, Flags<[CoreOption]>, HelpText<"Disable check for libspirv">;
def fsycl_host_compiler_EQ : Joined<["-"], "fsycl-host-compiler=">,
Flags<[CoreOption]>, HelpText<"Specify C++ compiler binary to perform host "
Flags<[CoreOption, NoArgumentUnused]>, HelpText<"Specify C++ compiler binary to perform host "
"compilation with during SYCL offload compiles.">;
def fsycl_host_compiler_options_EQ : Joined<["-"], "fsycl-host-compiler-options=">,
Flags<[CoreOption]>, HelpText<"When performing the host compilation with "
Expand Down
6 changes: 6 additions & 0 deletions clang/test/Driver/sycl-host-compiler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -62,3 +62,9 @@
// RUN: %clangxx -fsycl -fsycl-host-compiler= -c -### %s 2>&1 \
// RUN: | FileCheck -check-prefix=HOST_COMPILER_NOARG %s
// HOST_COMPILER_NOARG: missing argument to '-fsycl-host-compiler='

/// Warning should not be emitted when using -fsycl-host-compiler when linking
// RUN: touch %t.o
// RUN: %clangxx -fsycl -fsycl-host-compiler=g++ %t.o -### 2>&1 \
// RUN: | FileCheck -check-prefix=WARNING_HOST_COMPILER %s
// WARNING_HOST_COMPILER-NOT: warning: argument unused during compilation: '-fsycl-host-compiler=g++' [-Wunused-command-line-argument]