blob: 3c154c5899ec1cfe1b10cec6369787d551419df4 [file] [log] [blame]
Daniel Dunbar70a3b772009-09-08 05:31:44 +00001# -*- Python -*-
2
3# Configuration file for the 'lit' test runner.
4
5import os
NAKAMURA Takumib3ccc122010-11-29 00:20:09 +00006import sys
David Greene18d49872011-01-03 17:30:25 +00007import re
Rafael Espindolad2930d32012-10-26 02:19:02 +00008import platform
David L. Jones8804b792017-07-06 21:46:47 +00009import subprocess
Daniel Dunbar70a3b772009-09-08 05:31:44 +000010
Daniel Dunbar27c35d92013-08-09 16:22:05 +000011import lit.util
12import lit.formats
Zachary Turner4af1a222017-09-16 18:46:21 +000013from lit.llvm import llvm_config
Zachary Turner19ac6f82017-10-06 17:54:46 +000014from lit.llvm.subst import FindTool
15from lit.llvm.subst import ToolSubst
Daniel Dunbar27c35d92013-08-09 16:22:05 +000016
Daniel Dunbar70a3b772009-09-08 05:31:44 +000017# name: The name of this test suite.
18config.name = 'LLVM'
19
20# testFormat: The test format to use to interpret tests.
Zachary Turner4af1a222017-09-16 18:46:21 +000021config.test_format = lit.formats.ShTest(not llvm_config.use_lit_shell)
Daniel Dunbar70a3b772009-09-08 05:31:44 +000022
Daniel Dunbar9d11edb2013-08-08 20:59:13 +000023# suffixes: A list of file extensions to treat as test files. This is overriden
24# by individual lit.local.cfg files in the test subdirectories.
Matthias Braun7b7e7132016-04-04 21:23:44 +000025config.suffixes = ['.ll', '.c', '.cxx', '.test', '.txt', '.s', '.mir']
Daniel Dunbar70a3b772009-09-08 05:31:44 +000026
Chandler Carruth7e621f32012-07-02 10:18:06 +000027# excludes: A list of directories to exclude from the testsuite. The 'Inputs'
28# subdirectories contain auxiliary inputs for various tests in their parent
29# directories.
Daniel Dunbar24ec2e52013-08-16 00:37:11 +000030config.excludes = ['Inputs', 'CMakeLists.txt', 'README.txt', 'LICENSE.txt']
Chandler Carruth7e621f32012-07-02 10:18:06 +000031
Daniel Dunbar70a3b772009-09-08 05:31:44 +000032# test_source_root: The root path where tests are located.
33config.test_source_root = os.path.dirname(__file__)
34
35# test_exec_root: The root path where tests should be run.
Zachary Turnera0f1ea32017-09-15 22:10:46 +000036config.test_exec_root = os.path.join(config.llvm_obj_root, 'test')
Daniel Dunbar70a3b772009-09-08 05:31:44 +000037
Nico Rieck7e873732013-04-12 04:07:13 +000038# Tweak the PATH to include the tools dir.
Zachary Turner4af1a222017-09-16 18:46:21 +000039llvm_config.with_environment('PATH', config.llvm_tools_dir, append_path=True)
Daniel Dunbar5ed7be12009-11-08 09:08:00 +000040
Zachary Turner4af1a222017-09-16 18:46:21 +000041# Propagate some variables from the host environment.
Zachary Turnere959bd02017-10-06 17:54:27 +000042llvm_config.with_system_environment(
43 ['HOME', 'INCLUDE', 'LIB', 'TMP', 'TEMP', 'ASAN_SYMBOLIZER_PATH', 'MSAN_SYMBOLIZER_PATH'])
Michael J. Spencer44d392a2010-12-07 01:23:49 +000044
Daniel Dunbar9b2cb692010-06-12 16:21:19 +000045
Peter Zotov47f88b52014-10-30 08:29:45 +000046# Set up OCAMLPATH to include newly built OCaml libraries.
Zachary Turnera0f1ea32017-09-15 22:10:46 +000047top_ocaml_lib = os.path.join(config.llvm_lib_dir, 'ocaml')
48llvm_ocaml_lib = os.path.join(top_ocaml_lib, 'llvm')
Peter Zotov95a8dca2014-11-03 09:50:53 +000049
Zachary Turner4af1a222017-09-16 18:46:21 +000050llvm_config.with_system_environment('OCAMLPATH')
51llvm_config.with_environment('OCAMLPATH', top_ocaml_lib, append_path=True)
52llvm_config.with_environment('OCAMLPATH', llvm_ocaml_lib, append_path=True)
53
54llvm_config.with_system_environment('CAML_LD_LIBRARY_PATH')
Zachary Turnere959bd02017-10-06 17:54:27 +000055llvm_config.with_environment(
56 'CAML_LD_LIBRARY_PATH', llvm_ocaml_lib, append_path=True)
Peter Zotov47f88b52014-10-30 08:29:45 +000057
Peter Zotovd1fc3a02014-10-30 08:29:57 +000058# Set up OCAMLRUNPARAM to enable backtraces in OCaml tests.
Zachary Turner4af1a222017-09-16 18:46:21 +000059llvm_config.with_environment('OCAMLRUNPARAM', 'b')
Peter Zotovd1fc3a02014-10-30 08:29:57 +000060
Bruno Cardoso Lopes749f3382016-08-04 22:01:38 +000061# Provide the path to asan runtime lib 'libclang_rt.asan_osx_dynamic.dylib' if
62# available. This is darwin specific since it's currently only needed on darwin.
Zachary Turnere959bd02017-10-06 17:54:27 +000063
64
Bruno Cardoso Lopes749f3382016-08-04 22:01:38 +000065def get_asan_rtlib():
Zachary Turnere959bd02017-10-06 17:54:27 +000066 if not 'Address' in config.llvm_use_sanitizer or \
67 not 'Darwin' in config.host_os or \
68 not 'x86' in config.host_triple:
69 return ''
Bruno Cardoso Lopes749f3382016-08-04 22:01:38 +000070 try:
71 import glob
72 except:
Zachary Turnere959bd02017-10-06 17:54:27 +000073 print('glob module not found, skipping get_asan_rtlib() lookup')
74 return ''
Bruno Cardoso Lopes749f3382016-08-04 22:01:38 +000075 # The libclang_rt.asan_osx_dynamic.dylib path is obtained using the relative
76 # path from the host cc.
Zachary Turnere959bd02017-10-06 17:54:27 +000077 host_lib_dir = os.path.join(os.path.dirname(config.host_cc), '../lib')
Bruno Cardoso Lopes749f3382016-08-04 22:01:38 +000078 asan_dylib_dir_pattern = host_lib_dir + \
Zachary Turnere959bd02017-10-06 17:54:27 +000079 '/clang/*/lib/darwin/libclang_rt.asan_osx_dynamic.dylib'
Bruno Cardoso Lopes749f3382016-08-04 22:01:38 +000080 found_dylibs = glob.glob(asan_dylib_dir_pattern)
81 if len(found_dylibs) != 1:
Zachary Turnere959bd02017-10-06 17:54:27 +000082 return ''
Bruno Cardoso Lopes749f3382016-08-04 22:01:38 +000083 return found_dylibs[0]
84
Zachary Turnere959bd02017-10-06 17:54:27 +000085
Zachary Turner19ac6f82017-10-06 17:54:46 +000086llvm_config.use_default_substitutions()
87
88# Add site-specific substitutions.
89config.substitutions.append(('%llvmshlibdir', config.llvm_shlib_dir))
90config.substitutions.append(('%shlibext', config.llvm_shlib_ext))
91config.substitutions.append(('%exeext', config.llvm_exe_ext))
Zachary Turner19ac6f82017-10-06 17:54:46 +000092
93
94lli_args = []
Peter Collingbournefbb662f2013-01-16 17:27:22 +000095# The target triple used by default by lli is the process target triple (some
96# triple appropriate for generating code for the current process) but because
97# we don't support COFF in MCJIT well enough for the tests, force ELF format on
98# Windows. FIXME: the process target triple should be used here, but this is
99# difficult to obtain on Windows.
Petr Hosek13ced782018-08-09 02:16:18 +0000100if re.search(r'cygwin|windows-gnu|windows-msvc', config.host_triple):
Zachary Turner19ac6f82017-10-06 17:54:46 +0000101 lli_args = ['-mtriple=' + config.host_triple + '-elf']
102
103llc_args = []
Andrew Kaylor7bbd6e32012-10-02 18:38:34 +0000104
Petr Hosek13ced782018-08-09 02:16:18 +0000105# Similarly, have a macro to use llc with DWARF even when the host is Windows
106if re.search(r'windows-msvc', config.target_triple):
Zachary Turner19ac6f82017-10-06 17:54:46 +0000107 llc_args = [' -mtriple=' +
Petr Hosek13ced782018-08-09 02:16:18 +0000108 config.target_triple.replace('-msvc', '-gnu')]
Daniel Dunbar70a3b772009-09-08 05:31:44 +0000109
Bruno Cardoso Lopes749f3382016-08-04 22:01:38 +0000110# Provide the path to asan runtime lib if available. On darwin, this lib needs
111# to be loaded via DYLD_INSERT_LIBRARIES before libLTO.dylib in case the files
112# to be linked contain instrumented sanitizer code.
Bruno Cardoso Lopes45448962016-08-04 23:58:30 +0000113ld64_cmd = config.ld64_executable
114asan_rtlib = get_asan_rtlib()
115if asan_rtlib:
Zachary Turnere959bd02017-10-06 17:54:27 +0000116 ld64_cmd = 'DYLD_INSERT_LIBRARIES={} {}'.format(asan_rtlib, ld64_cmd)
Bruno Cardoso Lopes749f3382016-08-04 22:01:38 +0000117
Zachary Turner19ac6f82017-10-06 17:54:46 +0000118ocamlc_command = '%s ocamlc -cclib -L%s %s' % (
119 config.ocamlfind_executable, config.llvm_lib_dir, config.ocaml_flags)
120ocamlopt_command = 'true'
Michal Gorny1159e422017-01-06 21:33:48 +0000121if config.have_ocamlopt:
Zachary Turner19ac6f82017-10-06 17:54:46 +0000122 ocamlopt_command = '%s ocamlopt -cclib -L%s -cclib -Wl,-rpath,%s %s' % (
123 config.ocamlfind_executable, config.llvm_lib_dir, config.llvm_lib_dir, config.ocaml_flags)
Peter Zotovb4d023a2014-10-28 22:39:36 +0000124
Adam Nemetd3ee0652017-11-29 17:07:41 +0000125opt_viewer_cmd = '%s %s/tools/opt-viewer/opt-viewer.py' % (sys.executable, config.llvm_src_root)
Paul Robinsonb9d62632014-03-21 17:31:35 +0000126
Zachary Turner19ac6f82017-10-06 17:54:46 +0000127tools = [
128 ToolSubst('%lli', FindTool('lli'), post='.', extra_args=lli_args),
129 ToolSubst('%llc_dwarf', FindTool('llc'), extra_args=llc_args),
130 ToolSubst('%go', config.go_executable, unresolved='ignore'),
131 ToolSubst('%gold', config.gold_executable, unresolved='ignore'),
132 ToolSubst('%ld64', ld64_cmd, unresolved='ignore'),
133 ToolSubst('%ocamlc', ocamlc_command, unresolved='ignore'),
134 ToolSubst('%ocamlopt', ocamlopt_command, unresolved='ignore'),
Adam Nemetd3ee0652017-11-29 17:07:41 +0000135 ToolSubst('%opt-viewer', opt_viewer_cmd),
Yunlian Jiangedd00e42018-04-13 05:03:28 +0000136 ToolSubst('%llvm-objcopy', FindTool('llvm-objcopy')),
Alexander Shaposhnikov6608b6d2018-05-07 21:07:01 +0000137 ToolSubst('%llvm-strip', FindTool('llvm-strip')),
Zachary Turner19ac6f82017-10-06 17:54:46 +0000138]
Eli Benderskydafd1a62013-06-14 19:14:52 +0000139
Zachary Turner19ac6f82017-10-06 17:54:46 +0000140# FIXME: Why do we have both `lli` and `%lli` that do slightly different things?
141tools.extend([
Clement Courbet7167e4d2018-09-25 13:59:35 +0000142 'dsymutil', 'lli', 'lli-child-target', 'llvm-ar', 'llvm-as',
143 'llvm-bcanalyzer', 'llvm-config', 'llvm-cov', 'llvm-cxxdump', 'llvm-cvtres',
144 'llvm-diff', 'llvm-dis', 'llvm-dwarfdump', 'llvm-exegesis', 'llvm-extract',
145 'llvm-isel-fuzzer', 'llvm-opt-fuzzer', 'llvm-lib', 'llvm-link', 'llvm-lto',
146 'llvm-lto2', 'llvm-mc', 'llvm-mca', 'llvm-modextract', 'llvm-nm',
147 'llvm-objcopy', 'llvm-objdump', 'llvm-pdbutil', 'llvm-profdata',
James Hendersona4a9a182018-12-12 10:34:01 +0000148 'llvm-ranlib', 'llvm-readelf', 'llvm-readobj', 'llvm-rtdyld', 'llvm-size',
149 'llvm-split', 'llvm-strings', 'llvm-strip', 'llvm-tblgen', 'llvm-undname',
150 'llvm-c-test', 'llvm-cxxfilt', 'llvm-xray', 'yaml2obj', 'obj2yaml',
151 'yaml-bench', 'verify-uselistorder', 'bugpoint', 'llc', 'llvm-symbolizer',
152 'opt', 'sancov', 'sanstats'])
Justin Bognera2c5cae2015-09-02 18:03:01 +0000153
Zachary Turner19ac6f82017-10-06 17:54:46 +0000154# The following tools are optional
155tools.extend([
156 ToolSubst('llvm-go', unresolved='ignore'),
157 ToolSubst('llvm-mt', unresolved='ignore'),
158 ToolSubst('Kaleidoscope-Ch3', unresolved='ignore'),
159 ToolSubst('Kaleidoscope-Ch4', unresolved='ignore'),
160 ToolSubst('Kaleidoscope-Ch5', unresolved='ignore'),
161 ToolSubst('Kaleidoscope-Ch6', unresolved='ignore'),
162 ToolSubst('Kaleidoscope-Ch7', unresolved='ignore'),
163 ToolSubst('Kaleidoscope-Ch8', unresolved='ignore')])
Justin Bognera2c5cae2015-09-02 18:03:01 +0000164
Zachary Turner19ac6f82017-10-06 17:54:46 +0000165llvm_config.add_tool_substitutions(tools, config.llvm_tools_dir)
Justin Bognera2c5cae2015-09-02 18:03:01 +0000166
Zachary Turnere959bd02017-10-06 17:54:27 +0000167# Targets
Alp Toker8aeca442014-06-09 22:42:55 +0000168
169config.targets = frozenset(config.targets_to_build.split())
170
Reid Klecknerd3396f42016-08-10 19:03:18 +0000171for arch in config.targets_to_build.split():
172 config.available_features.add(arch.lower() + '-registered-target')
173
Zachary Turnere959bd02017-10-06 17:54:27 +0000174# Features
Jake Ehrlich56898c12017-11-02 23:14:55 +0000175known_arches = ["x86_64", "mips64", "ppc64", "aarch64"]
NAKAMURA Takumice4da272017-11-04 06:55:55 +0000176if (config.host_ldflags.find("-m32") < 0
177 and any(config.llvm_host_triple.startswith(x) for x in known_arches)):
Jake Ehrlich56898c12017-11-02 23:14:55 +0000178 config.available_features.add("llvm-64-bits")
NAKAMURA Takumib3ccc122010-11-29 00:20:09 +0000179
NAKAMURA Takumi7e980a62013-06-26 10:56:44 +0000180# Others/can-execute.txt
181if sys.platform not in ['win32']:
182 config.available_features.add('can-execute')
Lang Hamesd5ab2f82016-08-09 20:48:22 +0000183 config.available_features.add('not_COFF')
NAKAMURA Takumi7e980a62013-06-26 10:56:44 +0000184
NAKAMURA Takumib3ccc122010-11-29 00:20:09 +0000185# Loadable module
186# FIXME: This should be supplied by Makefile or autoconf.
187if sys.platform in ['win32', 'cygwin']:
188 loadable_module = (config.enable_shared == 1)
189else:
190 loadable_module = True
191
192if loadable_module:
193 config.available_features.add('loadable_module')
Andrew Trickf2a58422011-06-22 23:23:19 +0000194
Michal Gorny4d352392017-01-06 21:33:54 +0000195# Static libraries are not built if BUILD_SHARED_LIBS is ON.
Sam Clegg88d22be2017-10-18 19:37:30 +0000196if not config.build_shared_libs and not config.link_llvm_dylib:
Zachary Turnere959bd02017-10-06 17:54:27 +0000197 config.available_features.add('static-libs')
Michal Gorny4d352392017-01-06 21:33:54 +0000198
Petr Hosekb10b1582018-01-08 02:48:41 +0000199def have_cxx_shared_library():
200 readobj_exe = lit.util.which('llvm-readobj', config.llvm_tools_dir)
201 if not readobj_exe:
202 print('llvm-readobj not found')
203 return False
204
205 try:
206 readobj_cmd = subprocess.Popen(
207 [readobj_exe, '-needed-libs', readobj_exe], stdout=subprocess.PIPE)
208 except OSError:
209 print('could not exec llvm-readobj')
210 return False
211
212 readobj_out = readobj_cmd.stdout.read().decode('ascii')
213 readobj_cmd.wait()
214
215 regex = re.compile(r'(libc\+\+|libstdc\+\+|msvcp).*\.(so|dylib|dll)')
216 needed_libs = False
217 for line in readobj_out.splitlines():
218 if 'NeededLibraries [' in line:
219 needed_libs = True
220 if ']' in line:
221 needed_libs = False
222 if needed_libs and regex.search(line.lower()):
223 return True
224 return False
225
226if have_cxx_shared_library():
227 config.available_features.add('cxx-shared-library')
228
Jyotsna Vermaf0ca9a82013-04-10 19:53:26 +0000229# Direct object generation
NAKAMURA Takumi01e490b2015-12-20 03:48:23 +0000230if not 'hexagon' in config.target_triple:
Zachary Turnere959bd02017-10-06 17:54:27 +0000231 config.available_features.add('object-emission')
Jyotsna Vermaf0ca9a82013-04-10 19:53:26 +0000232
Mehdi Amini793a2b12015-09-16 05:34:32 +0000233# LLVM can be configured with an empty default triple
234# Some tests are "generic" and require a valid default triple
235if config.target_triple:
Zachary Turnere959bd02017-10-06 17:54:27 +0000236 config.available_features.add('default_triple')
Amaury de la Vieuville2c9d79b2013-09-13 10:59:01 +0000237
NAKAMURA Takumif86186e2011-11-28 05:09:15 +0000238import subprocess
Rafael Espindola12cc4652014-07-27 23:11:06 +0000239
Zachary Turnere959bd02017-10-06 17:54:27 +0000240
Rafael Espindola12cc4652014-07-27 23:11:06 +0000241def have_ld_plugin_support():
Eugene Leviant737553b2018-06-20 15:32:47 +0000242 if not os.path.exists(os.path.join(config.llvm_shlib_dir, 'LLVMgold' + config.llvm_shlib_ext)):
Rafael Espindola12cc4652014-07-27 23:11:06 +0000243 return False
244
Zachary Turnere959bd02017-10-06 17:54:27 +0000245 ld_cmd = subprocess.Popen(
246 [config.gold_executable, '--help'], stdout=subprocess.PIPE, env={'LANG': 'C'})
NAKAMURA Takumi19d9f342015-01-05 14:18:04 +0000247 ld_out = ld_cmd.stdout.read().decode()
Rafael Espindola12cc4652014-07-27 23:11:06 +0000248 ld_cmd.wait()
249
Rafael Espindolabc645602014-11-11 05:27:12 +0000250 if not '-plugin' in ld_out:
251 return False
252
253 # check that the used emulations are supported.
254 emu_line = [l for l in ld_out.split('\n') if 'supported emulations' in l]
255 if len(emu_line) != 1:
256 return False
257 emu_line = emu_line[0]
258 fields = emu_line.split(':')
259 if len(fields) != 3:
260 return False
261 emulations = fields[2].split()
Peter Collingbourne5e868042015-03-19 18:23:31 +0000262 if 'elf_x86_64' not in emulations:
Rafael Espindolabc645602014-11-11 05:27:12 +0000263 return False
Peter Collingbourne5e868042015-03-19 18:23:31 +0000264 if 'elf32ppc' in emulations:
265 config.available_features.add('ld_emu_elf32ppc')
Rafael Espindolabc645602014-11-11 05:27:12 +0000266
Zachary Turnere959bd02017-10-06 17:54:27 +0000267 ld_version = subprocess.Popen(
268 [config.gold_executable, '--version'], stdout=subprocess.PIPE, env={'LANG': 'C'})
Chandler Carruth45d67e92015-02-14 09:05:56 +0000269 if not 'GNU gold' in ld_version.stdout.read().decode():
Rafael Espindola12cc4652014-07-27 23:11:06 +0000270 return False
271 ld_version.wait()
272
273 return True
274
Zachary Turnere959bd02017-10-06 17:54:27 +0000275
Rafael Espindola12cc4652014-07-27 23:11:06 +0000276if have_ld_plugin_support():
277 config.available_features.add('ld_plugin')
278
Zachary Turnere959bd02017-10-06 17:54:27 +0000279
Peter Collingbourneaa014002015-03-19 23:55:38 +0000280def have_ld64_plugin_support():
Michal Gorny1159e422017-01-06 21:33:48 +0000281 if not config.llvm_tool_lto_build or config.ld64_executable == '':
Peter Collingbourneaa014002015-03-19 23:55:38 +0000282 return False
283
Zachary Turnere959bd02017-10-06 17:54:27 +0000284 ld_cmd = subprocess.Popen(
285 [config.ld64_executable, '-v'], stderr=subprocess.PIPE)
Peter Collingbourneaa014002015-03-19 23:55:38 +0000286 ld_out = ld_cmd.stderr.read().decode()
287 ld_cmd.wait()
288
289 if 'ld64' not in ld_out or 'LTO' not in ld_out:
290 return False
291
292 return True
293
Zachary Turnere959bd02017-10-06 17:54:27 +0000294
Peter Collingbourneaa014002015-03-19 23:55:38 +0000295if have_ld64_plugin_support():
296 config.available_features.add('ld64_plugin')
297
Zachary Turner4af1a222017-09-16 18:46:21 +0000298# Ask llvm-config about asserts and global-isel.
Zachary Turneraf03e792017-09-18 22:26:48 +0000299llvm_config.feature_config(
Zachary Turnere959bd02017-10-06 17:54:27 +0000300 [('--assertion-mode', {'ON': 'asserts'}),
301 ('--has-global-isel', {'ON': 'global-isel'})])
David Dean2c3c7fd2013-07-11 23:36:57 +0000302
Nadav Rotem93976832013-08-21 05:02:12 +0000303if 'darwin' == sys.platform:
304 try:
305 sysctl_cmd = subprocess.Popen(['sysctl', 'hw.optional.fma'],
Zachary Turnere959bd02017-10-06 17:54:27 +0000306 stdout=subprocess.PIPE)
Nadav Rotem93976832013-08-21 05:02:12 +0000307 except OSError:
Zachary Turnere959bd02017-10-06 17:54:27 +0000308 print('Could not exec sysctl')
Daniel Dunbar51a0b772013-08-21 22:26:44 +0000309 result = sysctl_cmd.stdout.read().decode('ascii')
Zachary Turnere959bd02017-10-06 17:54:27 +0000310 if -1 != result.find('hw.optional.fma: 1'):
Nadav Rotem93976832013-08-21 05:02:12 +0000311 config.available_features.add('fma3')
312 sysctl_cmd.wait()
313
NAKAMURA Takumife755c52014-06-22 12:35:39 +0000314# .debug_frame is not emitted for targeting Windows x64.
Petr Hosek13ced782018-08-09 02:16:18 +0000315if not re.match(r'^x86_64.*-(windows-gnu|windows-msvc)', config.target_triple):
NAKAMURA Takumife755c52014-06-22 12:35:39 +0000316 config.available_features.add('debug_frame')
317
Kevin Enderby866cdd52016-05-23 21:34:12 +0000318if config.have_libxar:
319 config.available_features.add('xar')
NAKAMURA Takumi4e7fb912017-06-07 00:22:52 +0000320
Lang Hames91c25db2018-09-26 16:26:59 +0000321if config.enable_threads:
322 config.available_features.add('thread_support')
323
Zachary Turnere959bd02017-10-06 17:54:27 +0000324if config.llvm_libxml2_enabled == '1':
Eric Beckmannb99edc02017-07-27 01:11:53 +0000325 config.available_features.add('libxml2')
Adam Nemetd3ee0652017-11-29 17:07:41 +0000326
327if config.have_opt_viewer_modules:
328 config.available_features.add('have_opt_viewer_modules')