brintos

brintos / llvm-project-archived public Read only

0
0
Text · 579 B · 27edf61 Raw
19 lines · python
1def getRoot(config):2    if not config.parent:3        return config4    return getRoot(config.parent)5 6 7root = getRoot(config)8 9if "libdispatch" in root.available_features:10    additional_cflags = " -fblocks "11    for index, (template, replacement) in enumerate(config.substitutions):12        if template in ["%clang_tsan ", "%clangxx_tsan "]:13            config.substitutions[index] = (template, replacement + additional_cflags)14else:15    config.unsupported = True16 17if config.target_os == "Darwin":18    config.environment["TSAN_OPTIONS"] += ":ignore_noninstrumented_modules=1"19