[PATCH] D31742: [Builtins] Fix lit test setup for Windows
Weiming Zhao via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Apr 10 11:07:15 PDT 2017
weimingz updated this revision to Diff 94610.
weimingz added a comment.
Thanks for the info!
https://reviews.llvm.org/D31742
Files:
test/builtins/CMakeLists.txt
test/builtins/Unit/lit.cfg
test/builtins/Unit/lit.site.cfg.in
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")
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/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})
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D31742.94610.patch
Type: text/x-patch
Size: 1575 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20170410/8aae16eb/attachment.bin>
More information about the llvm-commits
mailing list