1 import("//llvm/utils/unittest/unittest.gni")
3 # FIXME: If we add -Wl,-z,nodelete to the global ldflags, we need to remove
4 # it again for these tests (cf CMake).
6 template("dynlib_add_module") {
7 not_needed(invoker, "*")
9 loadable_module(target_name) {
10 # Put plugin next to the unit test executable.
11 # This assumes that unittest() puts tests in target_out_dir.
12 output_dir = target_out_dir
18 if (host_os != "mac" && host_os != "win") {
19 # The GN build currently doesn't globally pass -fPIC, but that's
20 # needed for building .so files on ELF. Just pass it manually
21 # for loadable_modules for now.
27 dynlib_add_module("PipSqueak") {
30 dynlib_add_module("SecondLib") {
33 unittest("DynamicLibraryTests") {
37 "//llvm/include/llvm/Config:config",
41 "DynamicLibraryTest.cpp",
45 if (host_os != "mac" && host_os != "win") {
46 # Corresponds to export_executable_symbols() in cmake.
47 ldflags = [ "-rdynamic" ]