[PATCH] D106137: [flang][driver] Add support for Frontend Plugins

Stuart Ellis via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Fri Jul 16 03:12:31 PDT 2021


stuartellis created this revision.
Herald added subscribers: dang, mgorny.
Herald added a reviewer: sscalpone.
Herald added a reviewer: awarzynski.
stuartellis requested review of this revision.
Herald added a project: clang.
Herald added a subscriber: cfe-commits.

Introducing a plugin API and a simple HelloWorld Plugin example.
This patch adds the `-load` and `-plugin` flags to frontend driver and
the code around using custom frontend actions from within a plugin
shared library object.

It also adds to the Driver-help test to check the help option with the
updated driver flags.

Additionally, the patch creates a plugin-example test to check the
HelloWorld plugin example runs correctly. As part of this, a new CMake
flag (FLANG_BUILD_EXAMPLES) is added to allow the example to be built
and for the test to run.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D106137

Files:
  clang/include/clang/Driver/Options.td
  flang/CMakeLists.txt
  flang/examples/CMakeLists.txt
  flang/examples/HelloWorld/CMakeLists.txt
  flang/examples/HelloWorld/HelloWorldPlugin.cpp
  flang/include/flang/Frontend/FrontendActions.h
  flang/include/flang/Frontend/FrontendOptions.h
  flang/include/flang/Frontend/FrontendPluginRegistry.h
  flang/lib/Frontend/CompilerInvocation.cpp
  flang/lib/Frontend/FrontendAction.cpp
  flang/lib/Frontend/FrontendActions.cpp
  flang/lib/FrontendTool/ExecuteCompilerInvocation.cpp
  flang/test/CMakeLists.txt
  flang/test/Driver/driver-help.f90
  flang/test/Driver/plugin-example.f90
  flang/test/lit.cfg.py
  flang/test/lit.site.cfg.py.in
  flang/tools/flang-driver/CMakeLists.txt

-------------- next part --------------
A non-text attachment was scrubbed...
Name: D106137.359270.patch
Type: text/x-patch
Size: 14863 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20210716/d038b8c8/attachment-0001.bin>


More information about the cfe-commits mailing list