[all-commits] [llvm/llvm-project] f52fc5: [flang][driver] Add support for Frontend Plugins

Andrzej WarzyƄski via All-commits all-commits at lists.llvm.org
Thu Aug 12 03:56:21 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f52fc591fa34a8c85577108358b3b36c42b6d364
      https://github.com/llvm/llvm-project/commit/f52fc591fa34a8c85577108358b3b36c42b6d364
  Author: Stuart Ellis <stuart.ellis at arm.com>
  Date:   2021-08-12 (Thu, 12 Aug 2021)

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

  Log Message:
  -----------
  [flang][driver] Add support for Frontend Plugins

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.

This Plugin API has only been tested on Linux.

Reviewed By: awarzynski

Differential Revision: https://reviews.llvm.org/D106137




More information about the All-commits mailing list