summaryrefslogtreecommitdiff
path: root/flang/CMakeLists.txt
diff options
context:
space:
mode:
authorStuart Ellis <stuart.ellis@arm.com>2021-08-12 11:42:08 +0100
committerAndrzej Warzynski <andrzej.warzynski@arm.com>2021-08-12 11:42:16 +0100
commitf52fc591fa34a8c85577108358b3b36c42b6d364 (patch)
tree15b3d78f63b9d1a9137ab96a126613223c230356 /flang/CMakeLists.txt
parent8f359a80e466f221e3b3d93e65587d74f9ba2fda (diff)
downloadllvm-f52fc591fa34a8c85577108358b3b36c42b6d364.tar.gz
[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
Diffstat (limited to 'flang/CMakeLists.txt')
-rw-r--r--flang/CMakeLists.txt2
1 files changed, 2 insertions, 0 deletions
diff --git a/flang/CMakeLists.txt b/flang/CMakeLists.txt
index fc85f4451316..cf6055075c38 100644
--- a/flang/CMakeLists.txt
+++ b/flang/CMakeLists.txt
@@ -390,6 +390,8 @@ if (FLANG_BUILD_TOOLS)
add_subdirectory(tools)
endif()
add_subdirectory(runtime)
+
+option(FLANG_BUILD_EXAMPLES "Build Flang example programs by default." OFF)
add_subdirectory(examples)
if (FLANG_INCLUDE_TESTS)