[OpenMP] Make `-Xarch_host` and `-Xarch_device` work for OpenMP offloading
authorJoseph Huber <jhuber6@vols.utk.edu>
Tue, 17 Jan 2023 15:34:49 +0000 (09:34 -0600)
committerJoseph Huber <jhuber6@vols.utk.edu>
Tue, 17 Jan 2023 18:38:56 +0000 (12:38 -0600)
commiteec516a0954a5a91490ac4b6e86196e9813d9185
tree94f59586db83d370069b7f6f704751c14afacba5
parent83af411ca7c1572c79e4a515bf17a035837aae48
[OpenMP] Make `-Xarch_host` and `-Xarch_device` work for OpenMP offloading

Clang currently supports the `-Xarch_host` and `-Xarch_device` variants
to handle passing arguments to only one part of the offloading
toolchain. This was previously only supported fully for HIP / CUDA This
patch simple updates the logic to make it work for any offloading kind.

Fixes #59799

Reviewed By: tianshilei1992

Differential Revision: https://reviews.llvm.org/D141935
clang/lib/Driver/ToolChain.cpp
clang/test/Driver/openmp-offload-gpu.c