This patch adds new logic to create the necessary tool chains to support offloading for OpenMP. The OpenMP related options are checked and the tool chains created accordingly. Diagnostics are emitted in case the options are illegal or express unknown targets.
Details
Diff Detail
Event Timeline
lib/Driver/Driver.cpp | ||
---|---|---|
490–494 | I don't like the fact that we have similar string comparisons in different files. This must be handled in a single place. |
- Check the OpenMP flags only in one place for purposes of obtaining the runtime kind.
Hi Alexey,
Thanks for the review!
lib/Driver/Driver.cpp | ||
---|---|---|
490–494 | Ok, that makes sense. I moved the ownership of OpenMPRuntimeKind to the Driver, given that the Driver was being retrieved in Tools.cpp in order to emit the diagnostics. |
include/clang/Basic/DiagnosticDriverKinds.td | ||
---|---|---|
159 | This message does not tell the user how they might make their -fopenmp option "compatible with offloading." Please make sure the message does, or is has an associated hint message which does. |
Hi Hal,
Thanks for the review!
include/clang/Basic/DiagnosticDriverKinds.td | ||
---|---|---|
159 | Ok, the message is now: The option -fopenmp-targets must be used in conjunction with a -fopenmp option compatible with offloading, please use -fopenmp=libomp or -fopenmp=libiomp5. |
This message does not tell the user how they might make their -fopenmp option "compatible with offloading." Please make sure the message does, or is has an associated hint message which does.