]> granicus.if.org Git - llvm/commitdiff
[Bugpoint] Only run plugins tests if plugins are enabled
authorPetr Hosek <phosek@chromium.org>
Fri, 17 May 2019 06:41:04 +0000 (06:41 +0000)
committerPetr Hosek <phosek@chromium.org>
Fri, 17 May 2019 06:41:04 +0000 (06:41 +0000)
This is a followup to r360991 which applies the same logic to LLVM.

Differential Revision: https://reviews.llvm.org/D62050

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@360993 91177308-0d34-0410-b5e6-96231b3b80d8

14 files changed:
test/BugPoint/compile-custom.ll
test/BugPoint/crash-narrowfunctiontest.ll
test/BugPoint/func-attrs-keyval.ll
test/BugPoint/func-attrs.ll
test/BugPoint/invalid-debuginfo.ll
test/BugPoint/metadata.ll
test/BugPoint/named-md.ll
test/BugPoint/remove_arguments_test.ll
test/BugPoint/replace-funcs-with-null.ll
test/BugPoint/unsymbolized.ll
test/CMakeLists.txt
test/Feature/load_module.ll
test/lit.cfg.py
test/lit.site.cfg.py.in

index 847d1184f016b6360355f59527dc87de89da46bb..c892f8227789791cb1dc51ab234d37d7ef5d5ae1 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext --compile-custom --compile-command="%python %/s.py arg1 arg2" --output-prefix %t %s | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 ; Test that arguments are correctly passed in --compile-command.  The output
 ; of bugpoint includes the output of the custom tool, so we just echo the args
index d080d9dd4b0cac54d64b4fe42e9853ebddc2c2e2..fbccfc3d32cabf4d29ba4eac260d1b245b9adeef 100644 (file)
@@ -1,7 +1,7 @@
 ; Test that bugpoint can narrow down the testcase to the important function
 ;
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes > /dev/null
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 define i32 @foo() { ret i32 1 }
 
index 830d0964cde1a3523dcc6b8bea852268fb59b0f8..aaf8541e50d731f546f545603e17383a827401b0 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes
 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 ; CHECK: f() #[[ATTRS:[0-9]+]]
 define void @f() #0 {
index 3941e73c217c83b882c8a06f543518364ea2824c..8f742ee93d5f5cb38e94808f6ce1fceed1974007 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashfuncattr -silence-passes
 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 ; CHECK: f() #[[ATTRS:[0-9]+]]
 define void @f() #0 {
index 2005a13b67578de17d186fd7f4163c21bf3cec91..9169984c08880170fd791e035ad63829cbe784da 100644 (file)
@@ -1,5 +1,5 @@
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes 2>&1 | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 ; CHECK: DICompileUnit not listed in llvm.dbg.cu
 
 ; When bugpoint hacks at this testcase it will at one point create illegal IR
index ac77b9e5a7d1772f6418dfae461a956418315fad..a090bbde1de07fcabea561d729bd601f82a12200 100644 (file)
@@ -1,4 +1,4 @@
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes -disable-namedmd-remove -disable-strip-debuginfo -disable-strip-debug-types > /dev/null
 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
 ;
index 1ed34435fbebba40ac8b3c3c59bdf934c86cd7e4..dbdb18e234a1ceae1d86d932af7e95984575b5d9 100644 (file)
@@ -2,7 +2,7 @@
 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
 ; RUN-DISABLE: bugpoint -disable-namedmd-remove -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crash-too-many-cus -silence-passes > /dev/null
 ; RUN-DISABLE: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 ; CHECK: !llvm.dbg.cu = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]]}
 ; CHECK-DISABLE:      !llvm.dbg.cu = !{![[FIRST:[0-9]+]], ![[SECOND:[0-9]+]],
index 72be4fe559363d61da57e2a76f20d9114136880b..904c91788ce1d37db1f5f5d78a792b031e88348a 100644 (file)
@@ -1,6 +1,6 @@
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -bugpoint-crashcalls -silence-passes
 ; RUN: llvm-dis %t-reduced-simplified.bc -o - | FileCheck %s
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 ; Test to make sure that arguments are removed from the function if they are
 ; unnecessary. And clean up any types that frees up too.
index 622f9eb67a29faa7ee22256804f678f8ef5e9f2d..1de0d9e8e0444e84c40bd3e775d18d6d855827c8 100644 (file)
@@ -1,7 +1,7 @@
 ; Test that bugpoint can reduce the set of functions by replacing them with null.
 ;
 ; RUN: bugpoint -load %llvmshlibdir/BugpointPasses%shlibext %s -output-prefix %t -replace-funcs-with-null -bugpoint-crash-decl-funcs -silence-passes -safe-run-llc
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 
 @foo2 = alias i32 (), i32 ()* @foo
 
index da26b9dc4808aa75fd93e3bf9f5f84ef4bc8aafe..d2060ddee168c240ba825409d0cd9d20a86f63fb 100644 (file)
@@ -1,4 +1,4 @@
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 ; RUN: echo "import sys" > %t.py
 ; RUN: echo "print('args = ' + str(sys.argv))" >> %t.py
 ; RUN: echo "exit(1)" >> %t.py
index 69f4c3688e04d956654256bcc9792eec8d531856..f596602c8268d0a23b7172135979ad4c4a5bd334 100644 (file)
@@ -13,6 +13,7 @@ llvm_canonicalize_cmake_booleans(
   LLVM_TOOL_LTO_BUILD
   LLVM_USE_INTEL_JITEVENTS
   LLVM_BUILD_EXAMPLES
+  LLVM_ENABLE_PLUGINS
   )
 
 configure_lit_site_cfg(
index 14c1153fa5698ae0519be69bf666609a602f6f1e..fa76c99883b47684aa12dfc20764073325b94040 100644 (file)
@@ -1,7 +1,7 @@
 ; PR1318
 ; RUN: opt < %s -load=%llvmshlibdir/LLVMHello%shlibext -hello \
 ; RUN:   -disable-output 2>&1 | grep Hello
-; REQUIRES: loadable_module
+; REQUIRES: plugins
 ; FIXME: On Cygming, it might fail without building LLVMHello manually.
 
 @junk = global i32 0
index 5a4b1e8579e011435186c1a5a082f1251c62f52d..9228200048ce9b7fd793ce9ffa48fa9b4df669db 100644 (file)
@@ -187,14 +187,8 @@ else:
     config.available_features.add('can-execute')
 
 # Loadable module
-# FIXME: This should be supplied by Makefile or autoconf.
-if sys.platform in ['win32', 'cygwin']:
-    loadable_module = (config.enable_shared == 1)
-else:
-    loadable_module = True
-
-if loadable_module:
-    config.available_features.add('loadable_module')
+if config.has_plugins:
+    config.available_features.add('plugins')
 
 # Static libraries are not built if BUILD_SHARED_LIBS is ON.
 if not config.build_shared_libs and not config.link_llvm_dylib:
index ef3ae83369ce66445a8b237b92a95dfedf07da2c..39096a80e7e03c17ea7088d1ec92584295c19ba0 100644 (file)
@@ -45,6 +45,7 @@ config.llvm_host_triple = '@LLVM_HOST_TRIPLE@'
 config.host_arch = "@HOST_ARCH@"
 config.have_opt_viewer_modules = @LLVM_HAVE_OPT_VIEWER_MODULES@
 config.libcxx_used = @LLVM_LIBCXX_USED@
+config.has_plugins = @LLVM_ENABLE_PLUGINS@
 
 # Support substitution of the tools_dir with user parameters. This is
 # used when we can't determine the tool dir at configuration time.