| import os |
| import platform |
| import sys |
| |
| ## Autogenerated by Swift configuration. |
| # Do not edit! |
| config.llvm_src_root = "@LLVM_MAIN_SRC_DIR@" |
| config.llvm_obj_root = "@LLVM_BINARY_DIR@" |
| config.llvm_tools_dir = "@LLVM_TOOLS_DIR@" |
| config.llvm_libs_dir = "@LLVM_LIBS_DIR@" |
| config.lit_tools_dir = "@LLVM_LIT_TOOLS_DIR@" |
| config.swift_src_root = lit_config.params.get("swift_src_root", "@SWIFT_SOURCE_DIR@") |
| config.swift_obj_root = "@SWIFT_BINARY_DIR@" |
| config.target_triple = "@TARGET_TRIPLE@" |
| config.targets_to_build = "@TARGETS_TO_BUILD@" |
| config.variant_triple = "@VARIANT_TRIPLE@" |
| config.variant_sdk = "@VARIANT_SDK@" |
| config.swiftlib_dir = "@LIT_SWIFTLIB_DIR@" |
| config.darwin_xcrun_toolchain = "@SWIFT_DARWIN_XCRUN_TOOLCHAIN@" |
| |
| if "@SWIFT_ASAN_BUILD@" == "TRUE": |
| config.available_features.add("asan") |
| else: |
| config.available_features.add('no_asan') |
| |
| if "@LLVM_ENABLE_ASSERTIONS@" == "TRUE": |
| config.available_features.add('asserts') |
| else: |
| config.available_features.add('no_asserts') |
| |
| if "@SWIFT_STDLIB_ASSERTIONS@" == "TRUE": |
| config.available_features.add('swift_stdlib_asserts') |
| else: |
| config.available_features.add('swift_stdlib_no_asserts') |
| |
| if "@SWIFT_AST_VERIFIER@" == "TRUE": |
| config.available_features.add('swift_ast_verifier') |
| |
| if "@SWIFT_OPTIMIZED@" == "TRUE": |
| config.available_features.add("optimized_stdlib") |
| |
| if "@SWIFT_HAVE_WORKING_STD_REGEX@" == "FALSE": |
| config.available_features.add('broken_std_regex') |
| |
| if "@SWIFT_ENABLE_SOURCEKIT_TESTS@" == "TRUE": |
| config.available_features.add('sourcekit') |
| |
| # Let the main config do the real work. |
| if config.test_exec_root is None: |
| config.test_exec_root = os.path.dirname(os.path.realpath(__file__)) |
| lit_config.load_config( |
| config, os.path.join(config.swift_src_root, "test", "lit.cfg")) |