[OpenMP] Add support for '--offload-arch=native' to OpenMP offloading
authorJoseph Huber <jhuber6@vols.utk.edu>
Fri, 6 Jan 2023 03:01:26 +0000 (21:01 -0600)
committerJoseph Huber <jhuber6@vols.utk.edu>
Wed, 11 Jan 2023 16:30:38 +0000 (10:30 -0600)
commita17ab7aa3be0b2b2adf992e3754a58f17802491f
treee33dd9a9b50165fdb79799824174e86a8e25c1a6
parentfada90286008b52a59ff13b15675032787501001
[OpenMP] Add support for '--offload-arch=native' to OpenMP offloading

This patch adds support for '--offload-arch=native' to OpenMP
offloading. This will automatically generate the toolchains required to
fulfil whatever GPUs the user has installed. Getting this to work
requires a bit of a hack. The problem is that we need the ToolChain to
launch its searching program. But we do not yet have that ToolChain
built. I had to temporarily make the ToolChain and also add some logic
to ignore regular warnings & errors.

Depends on D141078

Reviewed By: jdoerfert

Differential Revision: https://reviews.llvm.org/D141105
clang/include/clang/Driver/Driver.h
clang/lib/Driver/Driver.cpp
clang/test/Driver/openmp-system-arch.c [new file with mode: 0644]