[llvm] 51c3e3f - [gn build] (manually) port f617ab104451 (DoublerPlugin)
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Wed Jun 30 11:49:15 PDT 2021
Author: Nico Weber
Date: 2021-06-30T14:49:06-04:00
New Revision: 51c3e3f80c7e6c1e8bf704e75bab999f2a8661e9
URL: https://github.com/llvm/llvm-project/commit/51c3e3f80c7e6c1e8bf704e75bab999f2a8661e9
DIFF: https://github.com/llvm/llvm-project/commit/51c3e3f80c7e6c1e8bf704e75bab999f2a8661e9.diff
LOG: [gn build] (manually) port f617ab104451 (DoublerPlugin)
Added:
Modified:
llvm/utils/gn/secondary/llvm/unittests/Passes/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/llvm/unittests/Passes/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/Passes/BUILD.gn
index fd0e19a50ab72..ce7acf1344c4c 100644
--- a/llvm/utils/gn/secondary/llvm/unittests/Passes/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/unittests/Passes/BUILD.gn
@@ -3,23 +3,25 @@ import("//llvm/utils/unittest/unittest.gni")
# Keyed off LLVM_ENABLE_PLUGINS in the CMake build, which is usually false
# on Windows and true elsewhere.
if (host_os != "win") {
- loadable_module("TestPlugin") {
- # Put plugin next to the unit test executable.
- output_dir = target_out_dir
+ foreach(plugin, ["TestPlugin", "DoublerPlugin"]) {
+ loadable_module(plugin) {
+ # Put plugin next to the unit test executable.
+ output_dir = target_out_dir
- sources = [ "TestPlugin.cpp" ]
+ sources = [ "$plugin.cpp" ]
- deps = [
- # TestPlugin doesn't want to link in any LLVM code, it just needs its
- # headers.
- "//llvm/include/llvm/IR:public_tablegen",
- ]
+ deps = [
+ # TestPlugin doesn't want to link in any LLVM code, it just needs its
+ # headers.
+ "//llvm/include/llvm/IR:public_tablegen",
+ ]
- if (host_os != "mac" && host_os != "win") {
- # The GN build currently doesn't globally pass -fPIC, but that's
- # needed for building .so files on ELF. Just pass it manually
- # for loadable_modules for now.
- cflags = [ "-fPIC" ]
+ if (host_os != "mac" && host_os != "win") {
+ # The GN build currently doesn't globally pass -fPIC, but that's
+ # needed for building .so files on ELF. Just pass it manually
+ # for loadable_modules for now.
+ cflags = [ "-fPIC" ]
+ }
}
}
}
@@ -38,7 +40,10 @@ unittest("PluginsTests") {
# Otherwise, reconfiguring with plugins disabled will leave behind a stale
# executable.
if (host_os != "win") {
- deps += [ ":TestPlugin" ]
+ deps += [
+ ":DoublerPlugin",
+ ":TestPlugin",
+ ]
defines = [ "LLVM_ENABLE_PLUGINS" ]
}
More information about the llvm-commits
mailing list