[PATCH] D66984: compiler-rt/builtins: Make check-builtins run tests on macOS.
Phabricator via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Sat Sep 14 15:22:16 PDT 2019
This revision was automatically updated to reflect the committed changes.
Closed by commit rL371926: compiler-rt/builtins: Make check-builtins run tests on macOS. (authored by nico, committed by ).
Changed prior to commit:
https://reviews.llvm.org/D66984?vs=220098&id=220235#toc
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D66984/new/
https://reviews.llvm.org/D66984
Files:
compiler-rt/trunk/test/builtins/CMakeLists.txt
compiler-rt/trunk/test/builtins/Unit/lit.cfg.py
Index: compiler-rt/trunk/test/builtins/Unit/lit.cfg.py
===================================================================
--- compiler-rt/trunk/test/builtins/Unit/lit.cfg.py
+++ compiler-rt/trunk/test/builtins/Unit/lit.cfg.py
@@ -29,6 +29,9 @@
base_lib = os.path.join(config.compiler_rt_libdir, "clang_rt.builtins%s.lib "
% config.target_suffix)
config.substitutions.append( ("%librt ", base_lib) )
+elif config.host_os == 'Darwin':
+ base_lib = os.path.join(config.compiler_rt_libdir, "libclang_rt.osx.a ")
+ config.substitutions.append( ("%librt ", base_lib + ' -lSystem ') )
else:
base_lib = os.path.join(config.compiler_rt_libdir, "libclang_rt.builtins%s.a"
% config.target_suffix)
Index: compiler-rt/trunk/test/builtins/CMakeLists.txt
===================================================================
--- compiler-rt/trunk/test/builtins/CMakeLists.txt
+++ compiler-rt/trunk/test/builtins/CMakeLists.txt
@@ -25,9 +25,12 @@
endif()
pythonize_bool(BUILTINS_IS_MSVC)
-#TODO: Add support for Apple.
-if (NOT APPLE)
-foreach(arch ${BUILTIN_SUPPORTED_ARCH})
+set(BUILTIN_TEST_ARCH ${BUILTIN_SUPPORTED_ARCH})
+if(APPLE)
+ darwin_filter_host_archs(BUILTIN_SUPPORTED_ARCH BUILTIN_TEST_ARCH)
+endif()
+
+foreach(arch ${BUILTIN_TEST_ARCH})
set(BUILTINS_TEST_TARGET_ARCH ${arch})
string(TOLOWER "-${arch}-${OS_NAME}" BUILTINS_TEST_CONFIG_SUFFIX)
get_test_cc_for_arch(${arch} BUILTINS_TEST_TARGET_CC BUILTINS_TEST_TARGET_CFLAGS)
@@ -49,7 +52,8 @@
)
list(APPEND BUILTINS_TESTSUITES ${CMAKE_CURRENT_BINARY_DIR}/Unit/${CONFIG_NAME})
endforeach()
-endif()
+
+# TODO: Add support for running tests on iOS and iOS simulator.
add_lit_testsuite(check-builtins "Running the Builtins tests"
${BUILTINS_TESTSUITES}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D66984.220235.patch
Type: text/x-patch
Size: 1794 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190914/80c9c68b/attachment.bin>
More information about the llvm-commits
mailing list