These lit configuration files are really Python source code. Using the .py file extension helps editors and tools use the correct language mode. LLVM and Clang already use this convention for lit configuration, this change simply applies it to all of compiler-rt. Reviewers: vitalybuka, dberris Differential Revision: https://reviews.llvm.org/D63658 llvm-svn: 364591
18 lines
550 B
Python
18 lines
550 B
Python
def getRoot(config):
|
|
if not config.parent:
|
|
return config
|
|
return getRoot(config.parent)
|
|
|
|
root = getRoot(config)
|
|
|
|
if 'libdispatch' in root.available_features:
|
|
additional_cflags = ' -fblocks '
|
|
for index, (template, replacement) in enumerate(config.substitutions):
|
|
if template in ['%clang_tsan ', '%clangxx_tsan ']:
|
|
config.substitutions[index] = (template, replacement + additional_cflags)
|
|
else:
|
|
config.unsupported = True
|
|
|
|
if config.host_os == 'Darwin':
|
|
config.environment['TSAN_OPTIONS'] += ':ignore_noninstrumented_modules=1'
|