[PATCH] D22221: Decide whether to enable plugin tests based on cmake variables

John Brawn via cfe-commits cfe-commits at lists.llvm.org
Mon Jul 11 08:04:08 PDT 2016


john.brawn created this revision.
john.brawn added reviewers: ehsan, reames, chapuni, Ilod.
john.brawn added a subscriber: cfe-commits.
john.brawn set the repository for this revision to rL LLVM.

Clang plugins work when either LLVM_ENABLE_PLUGINS or LLVM_EXPORT_SYMBOLS_FOR_PLUGINS is ON, so enable the 'plugins' test feature when that is the case.


Repository:
  rL LLVM

http://reviews.llvm.org/D22221

Files:
  test/lit.cfg
  test/lit.site.cfg.in

Index: test/lit.site.cfg.in
===================================================================
--- test/lit.site.cfg.in
+++ test/lit.site.cfg.in
@@ -7,6 +7,8 @@
 config.llvm_tools_dir = "@LLVM_TOOLS_DIR@"
 config.llvm_libs_dir = "@LLVM_LIBS_DIR@"
 config.llvm_shlib_dir = "@SHLIBDIR@"
+config.llvm_enable_plugins = "@LLVM_ENABLE_PLUGINS@"
+config.llvm_export_symbols_for_plugins = "@LLVM_EXPORT_SYMBOLS_FOR_PLUGINS@"
 config.llvm_plugin_ext = "@LLVM_PLUGIN_EXT@"
 config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@"
 config.clang_obj_root = "@CLANG_BINARY_DIR@"
Index: test/lit.cfg
===================================================================
--- test/lit.cfg
+++ test/lit.cfg
@@ -195,12 +195,8 @@
     lit_config.note('using clang: %r' % config.clang)
 
 # Plugins (loadable modules)
-# TODO: This should be supplied by Makefile or autoconf.
-if sys.platform in ['win32', 'cygwin']:
-    has_plugins = (config.enable_shared == 1)
-else:
-    has_plugins = True
-
+has_plugins = (config.llvm_enable_plugins == "ON" or
+               config.llvm_export_symbols_for_plugins == "ON")
 if has_plugins and config.llvm_plugin_ext:
     config.available_features.add('plugins')
 


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D22221.63517.patch
Type: text/x-patch
Size: 1176 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20160711/d99a98b9/attachment.bin>


More information about the cfe-commits mailing list