[llvm] 6d9ea91 - [gn] merge e46d8a731535
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Sat Mar 18 13:18:24 PDT 2023
Author: Nico Weber
Date: 2023-03-18T21:18:17+01:00
New Revision: 6d9ea9108a3be15b400ffda192a3c4831463d9e4
URL: https://github.com/llvm/llvm-project/commit/6d9ea9108a3be15b400ffda192a3c4831463d9e4
DIFF: https://github.com/llvm/llvm-project/commit/6d9ea9108a3be15b400ffda192a3c4831463d9e4.diff
LOG: [gn] merge e46d8a731535
Added:
llvm/utils/gn/secondary/llvm/unittests/Analysis/InlineOrderPlugin/BUILD.gn
Modified:
llvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn
index d946c57e338fc..2ff8a54de00e8 100644
--- a/llvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn
+++ b/llvm/utils/gn/secondary/llvm/unittests/Analysis/BUILD.gn
@@ -58,7 +58,10 @@ unittest("AnalysisTests") {
# Otherwise, reconfiguring with plugins disabled will leave behind a stale
# executable.
if (host_os != "win") {
- deps += [ "InlineAdvisorPlugin" ]
+ deps += [
+ "InlineAdvisorPlugin",
+ "InlineOrderPlugin",
+ ]
}
# Support plugins.
diff --git a/llvm/utils/gn/secondary/llvm/unittests/Analysis/InlineOrderPlugin/BUILD.gn b/llvm/utils/gn/secondary/llvm/unittests/Analysis/InlineOrderPlugin/BUILD.gn
new file mode 100644
index 0000000000000..0c5c0c5c6619e
--- /dev/null
+++ b/llvm/utils/gn/secondary/llvm/unittests/Analysis/InlineOrderPlugin/BUILD.gn
@@ -0,0 +1,23 @@
+if (host_os != "win") {
+ loadable_module("InlineOrderPlugin") {
+ # Put plugin next to the unit test executable.
+ output_dir =
+ rebase_path(get_label_info("//llvm/unittests/Analysis:AnalysisTests",
+ "target_out_dir"))
+
+ sources = [ "InlineOrderPlugin.cpp" ]
+
+ 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" ]
+ }
+ }
+}
More information about the llvm-commits
mailing list