forked from OSchip/llvm-project
[gn build] (manually) port f617ab1044
(DoublerPlugin)
This commit is contained in:
parent
f0693bc0ae
commit
51c3e3f80c
|
@ -3,11 +3,12 @@ import("//llvm/utils/unittest/unittest.gni")
|
||||||
# Keyed off LLVM_ENABLE_PLUGINS in the CMake build, which is usually false
|
# Keyed off LLVM_ENABLE_PLUGINS in the CMake build, which is usually false
|
||||||
# on Windows and true elsewhere.
|
# on Windows and true elsewhere.
|
||||||
if (host_os != "win") {
|
if (host_os != "win") {
|
||||||
loadable_module("TestPlugin") {
|
foreach(plugin, ["TestPlugin", "DoublerPlugin"]) {
|
||||||
|
loadable_module(plugin) {
|
||||||
# Put plugin next to the unit test executable.
|
# Put plugin next to the unit test executable.
|
||||||
output_dir = target_out_dir
|
output_dir = target_out_dir
|
||||||
|
|
||||||
sources = [ "TestPlugin.cpp" ]
|
sources = [ "$plugin.cpp" ]
|
||||||
|
|
||||||
deps = [
|
deps = [
|
||||||
# TestPlugin doesn't want to link in any LLVM code, it just needs its
|
# TestPlugin doesn't want to link in any LLVM code, it just needs its
|
||||||
|
@ -22,6 +23,7 @@ if (host_os != "win") {
|
||||||
cflags = [ "-fPIC" ]
|
cflags = [ "-fPIC" ]
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
unittest("PluginsTests") {
|
unittest("PluginsTests") {
|
||||||
|
@ -38,7 +40,10 @@ unittest("PluginsTests") {
|
||||||
# Otherwise, reconfiguring with plugins disabled will leave behind a stale
|
# Otherwise, reconfiguring with plugins disabled will leave behind a stale
|
||||||
# executable.
|
# executable.
|
||||||
if (host_os != "win") {
|
if (host_os != "win") {
|
||||||
deps += [ ":TestPlugin" ]
|
deps += [
|
||||||
|
":DoublerPlugin",
|
||||||
|
":TestPlugin",
|
||||||
|
]
|
||||||
defines = [ "LLVM_ENABLE_PLUGINS" ]
|
defines = [ "LLVM_ENABLE_PLUGINS" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue