Peter Collingbourne 3fa07ed5b3
Rename config.host_os to config.target_os.
config.host_os is derived from CMAKE_SYSTEM_NAME
which specifies the target. See:
https://cmake.org/cmake/help/latest/variable/CMAKE_SYSTEM_NAME.html

To reduce confusion, rename it to config.target_os.

The variable name config.target_os was already being used by the Orc
tests. Rename it to config.orc_test_target_os with a FIXME to remove.

Reviewers: JDevlieghere, MaskRay

Reviewed By: MaskRay

Pull Request: https://github.com/llvm/llvm-project/pull/149015
2025-07-17 11:12:29 -07:00

19 lines
579 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.target_os == "Darwin":
config.environment["TSAN_OPTIONS"] += ":ignore_noninstrumented_modules=1"