# Disable with sanitizers for now, this require some more setup apparently.
for san in ["asan", "msan", "ubsan"]:
    if san in config.available_features:
        config.unsupported = True

config.substitutions.append(("%cmake_exe", config.host_cmake))
config.substitutions.append(("%cmake_generator", config.host_cmake_generator))
config.substitutions.append(("%host_cxx", config.host_cxx))
config.substitutions.append(("%host_cc", config.host_cc))
config.substitutions.append(("%hostc_compiler_launcher", config.host_c_compiler_launcher))
config.substitutions.append(("%hostcxx_compiler_launcher", config.host_cxx_compiler_launcher))
config.substitutions.append(("%enable_libcxx", config.enable_libcxx))
config.substitutions.append(("%mlir_cmake_dir", config.mlir_cmake_dir))
config.substitutions.append(("%mlir_obj_root", config.mlir_obj_root))
config.substitutions.append(("%llvm_use_linker", config.llvm_use_linker))
config.substitutions.append(("%cmake_build_type", config.cmake_build_type))

if not config.llvm_shared_libs_build:
    config.available_features.add("non-shared-libs-build")
if config.enable_bindings_python:
    config.available_features.add("bindings-python")
