Index: test/builtins/CMakeLists.txt =================================================================== --- test/builtins/CMakeLists.txt +++ test/builtins/CMakeLists.txt @@ -13,6 +13,8 @@ include(builtin-config-ix) +pythonize_bool(MSVC) + #TODO: Add support for Apple. if (NOT APPLE) foreach(arch ${BUILTIN_SUPPORTED_ARCH}) Index: test/builtins/Unit/lit.cfg =================================================================== --- test/builtins/Unit/lit.cfg +++ test/builtins/Unit/lit.cfg @@ -24,7 +24,12 @@ config.test_source_root = os.path.dirname(__file__) # Path to the static library -base_lib = os.path.join(config.compiler_rt_libdir, "libclang_rt.builtins-%s.a " +is_msvc = getattr(config, "builtins_is_msvc", False) +if is_msvc: + base_lib = os.path.join(config.compiler_rt_libdir, "clang_rt.builtins-%s.lib" + % config.target_arch) +else: + base_lib = os.path.join(config.compiler_rt_libdir, "libclang_rt.builtins-%s.a" % config.target_arch) builtins_source_dir = os.path.join( Index: test/builtins/Unit/lit.site.cfg.in =================================================================== --- test/builtins/Unit/lit.site.cfg.in +++ test/builtins/Unit/lit.site.cfg.in @@ -4,7 +4,7 @@ config.builtins_lit_source_dir = "@BUILTINS_LIT_SOURCE_DIR@/Unit" config.target_cflags = "@BUILTINS_TEST_TARGET_CFLAGS@" config.target_arch = "@BUILTINS_TEST_TARGET_ARCH@" - +config.builtins_is_msvc = @MSVC_PYBOOL@ # Load common config for all compiler-rt lit tests. lit_config.load_config(config, "@COMPILER_RT_BINARY_DIR@/test/lit.common.configured")