@@ -455,6 +455,49 @@ armv7-noexceptions)
455
455
generate-cmake -C " ${MONOREPO_ROOT} /libcxx/cmake/caches/Armv7Thumb-noexceptions.cmake"
456
456
check-cxx-cxxabi
457
457
;;
458
+ generic-win)
459
+ clean
460
+ # TODO: The CI runner doesn't have bash in the path currently, and it's
461
+ # needed for running tests. Once it's available out of the box, remove this.
462
+ export PATH=" $PATH :/c/Program Files/Git/usr/bin"
463
+
464
+ # TODO: Clang-cl in MSVC configurations don't have access to compiler_rt
465
+ # builtins helpers for int128 division. See
466
+ # https://reviews.llvm.org/D91139#2429595 for a comment about longterm
467
+ # intent for handling the issue. In the meantime, define
468
+ # -D_LIBCPP_HAS_NO_INT128 (both when building the library itself and
469
+ # when building tests) to allow enabling filesystem for running tests,
470
+ # even if it uses a non-permanent ABI.
471
+
472
+ # TODO: The CI runner currently uses Clang 11, which doesn't implicitly
473
+ # link in oldnames.lib (which is needed for some tests) when compiling
474
+ # with the plain "clang" driver, as the tests do (as opposed to using
475
+ # the "clang-cl" driver for compiling). When the CI runner runs
476
+ # Clang 12, the "-loldnames" option can be dropped.
477
+
478
+ # TODO: Currently, building with the experimental library breaks running
479
+ # tests (the test linking look for the c++experimental library with the
480
+ # wrong name, and the statically linked c++experimental can't be linked
481
+ # correctly when libc++ visibility attributes indicate dllimport linkage
482
+ # anyway), thus just disable the experimental library. Remove this
483
+ # setting when cmake and the test driver does the right thing automatically.
484
+
485
+ echo " --- Generating CMake"
486
+ cmake -S " ${MONOREPO_ROOT} /libcxx" \
487
+ -B " ${BUILD_DIR} " \
488
+ -GNinja -DCMAKE_MAKE_PROGRAM=" ${NINJA} " \
489
+ -DCMAKE_BUILD_TYPE=RelWithDebInfo \
490
+ -DCMAKE_C_COMPILER=clang-cl \
491
+ -DCMAKE_CXX_COMPILER=clang-cl \
492
+ -DLLVM_LIT_ARGS=" -sv --show-unsupported --xunit-xml-output test-results.xml" \
493
+ -DLIBCXX_ENABLE_EXPERIMENTAL_LIBRARY=NO \
494
+ -DLIBCXX_ENABLE_FILESYSTEM=YES \
495
+ -DCMAKE_CXX_FLAGS=" -D_LIBCPP_HAS_NO_INT128" \
496
+ -DLIBCXX_TEST_COMPILER_FLAGS=" -D_LIBCPP_HAS_NO_INT128" \
497
+ -DLIBCXX_TEST_LINKER_FLAGS=" -loldnames"
498
+ echo " +++ Running the libc++ tests"
499
+ ${NINJA} -vC " ${BUILD_DIR} " check-cxx
500
+ ;;
458
501
* )
459
502
echo " ${BUILDER} is not a known configuration"
460
503
exit 1
0 commit comments