[docs] Fix build-docs.sh
[llvm-project.git] / compiler-rt / test / tsan / libdispatch / lit.local.cfg.py
blob9d3cf75489ad239144ae424918b8e6e3474151ca
1 def getRoot(config):
2 if not config.parent:
3 return config
4 return getRoot(config.parent)
6 root = getRoot(config)
8 if 'libdispatch' in root.available_features:
9 additional_cflags = ' -fblocks '
10 for index, (template, replacement) in enumerate(config.substitutions):
11 if template in ['%clang_tsan ', '%clangxx_tsan ']:
12 config.substitutions[index] = (template, replacement + additional_cflags)
13 else:
14 config.unsupported = True
16 if config.host_os == 'Darwin':
17 config.environment['TSAN_OPTIONS'] += ':ignore_noninstrumented_modules=1'