[libcxx-commits] [libcxx] b274728 - [libc++] Switch a few CI jobs to the minimal Lit configuration

Louis Dionne via libcxx-commits libcxx-commits at lists.llvm.org
Thu May 20 07:46:15 PDT 2021


Author: Louis Dionne
Date: 2021-05-20T10:46:59-04:00
New Revision: b274728b1a6fdd8a31988e593c2a59a6ff3f9a0a

URL: https://github.com/llvm/llvm-project/commit/b274728b1a6fdd8a31988e593c2a59a6ff3f9a0a
DIFF: https://github.com/llvm/llvm-project/commit/b274728b1a6fdd8a31988e593c2a59a6ff3f9a0a.diff

LOG: [libc++] Switch a few CI jobs to the minimal Lit configuration

Eventually, this should become the default way of running the tests.
For now, only move a few CI nodes to it, and keep a node that runs the
legacy configuration.

Differential Revision: https://reviews.llvm.org/D97565

Added: 
    

Modified: 
    libcxx/cmake/caches/Generic-static.cmake
    libcxx/test/CMakeLists.txt
    libcxx/test/configs/libcxx-trunk-shared.cfg.in
    libcxx/test/configs/libcxx-trunk-static.cfg.in
    libcxx/utils/ci/buildkite-pipeline.yml
    libcxx/utils/ci/run-buildbot

Removed: 
    


################################################################################
diff  --git a/libcxx/cmake/caches/Generic-static.cmake b/libcxx/cmake/caches/Generic-static.cmake
index 4fe910ce4d801..ed2bf857146dc 100644
--- a/libcxx/cmake/caches/Generic-static.cmake
+++ b/libcxx/cmake/caches/Generic-static.cmake
@@ -1,10 +1,3 @@
 set(LIBCXX_ENABLE_SHARED OFF CACHE BOOL "")
 set(LIBCXXABI_ENABLE_SHARED OFF CACHE BOOL "")
 set(LIBUNWIND_ENABLE_SHARED OFF CACHE BOOL "")
-
-# TODO: We should switch this to a from-sratch config with static libraries
-# instead and get rid of these options.
-set(LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI OFF CACHE BOOL "")
-set(LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXX OFF CACHE BOOL "")
-set(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXXABI OFF CACHE BOOL "")
-set(LIBCXXABI_LINK_TESTS_WITH_SHARED_LIBCXX OFF CACHE BOOL "")

diff  --git a/libcxx/test/CMakeLists.txt b/libcxx/test/CMakeLists.txt
index 0892822b943ae..429b7905fdce6 100644
--- a/libcxx/test/CMakeLists.txt
+++ b/libcxx/test/CMakeLists.txt
@@ -26,6 +26,7 @@ if (LIBCXX_ENABLE_ABI_LINKER_SCRIPT)
   set(LIBCXXABI_USE_LLVM_UNWINDER OFF)
 endif()
 
+# TODO: Clients using those options should switch to from-scratch Lit configuration files.
 option(LIBCXX_LINK_TESTS_WITH_SHARED_LIBCXXABI
        "Whether the libc++ tests should link with the shared libc++abi library"
        ${LIBCXXABI_ENABLE_SHARED})

diff  --git a/libcxx/test/configs/libcxx-trunk-shared.cfg.in b/libcxx/test/configs/libcxx-trunk-shared.cfg.in
index 0abca6a728bdb..127d824f3ecf8 100644
--- a/libcxx/test/configs/libcxx-trunk-shared.cfg.in
+++ b/libcxx/test/configs/libcxx-trunk-shared.cfg.in
@@ -5,6 +5,7 @@ INSTALL_ROOT = "@CMAKE_BINARY_DIR@"
 COMPILER = "@CMAKE_CXX_COMPILER@"
 EXEC_ROOT = "@LIBCXX_BINARY_DIR@"
 CMAKE_OSX_SYSROOT = "@CMAKE_OSX_SYSROOT@"
+TARGET_TRIPLE = "@TARGET_TRIPLE@"
 
 import os
 import pipes
@@ -22,6 +23,8 @@ config.test_source_root = os.path.join(LIBCXX_ROOT, 'test')
 config.test_format = libcxx.test.format.CxxStandardLibraryTest()
 config.recursiveExpansionLimit = 10
 config.test_exec_root = EXEC_ROOT
+if TARGET_TRIPLE:
+    config.target_triple = TARGET_TRIPLE
 
 # Configure basic substitutions
 runPy = os.path.join(LIBCXX_ROOT, 'utils', 'run.py')
@@ -35,7 +38,7 @@ config.substitutions.append(('%{compile_flags}',
         os.path.join(LIBCXX_ROOT, 'test', 'support'))
 ))
 config.substitutions.append(('%{link_flags}',
-    '-nostdlib++ -L {0} -lc++ -Wl,-rpath,{0}'.format(
+    '-nostdlib++ -L {0} -lc++ -Wl,-rpath,{0} -pthread'.format(
         os.path.join(INSTALL_ROOT, 'lib'))
 ))
 config.substitutions.append(('%{exec}',

diff  --git a/libcxx/test/configs/libcxx-trunk-static.cfg.in b/libcxx/test/configs/libcxx-trunk-static.cfg.in
index 0b05fb6bc09bb..419ed84c8e609 100644
--- a/libcxx/test/configs/libcxx-trunk-static.cfg.in
+++ b/libcxx/test/configs/libcxx-trunk-static.cfg.in
@@ -5,6 +5,7 @@ INSTALL_ROOT = "@CMAKE_BINARY_DIR@"
 COMPILER = "@CMAKE_CXX_COMPILER@"
 EXEC_ROOT = "@LIBCXX_BINARY_DIR@"
 CMAKE_OSX_SYSROOT = "@CMAKE_OSX_SYSROOT@"
+TARGET_TRIPLE = "@TARGET_TRIPLE@"
 
 import os
 import pipes
@@ -22,6 +23,8 @@ config.test_source_root = os.path.join(LIBCXX_ROOT, 'test')
 config.test_format = libcxx.test.format.CxxStandardLibraryTest()
 config.recursiveExpansionLimit = 10
 config.test_exec_root = EXEC_ROOT
+if TARGET_TRIPLE:
+    config.target_triple = TARGET_TRIPLE
 
 # Configure basic substitutions
 runPy = os.path.join(LIBCXX_ROOT, 'utils', 'run.py')
@@ -35,7 +38,7 @@ config.substitutions.append(('%{compile_flags}',
         os.path.join(LIBCXX_ROOT, 'test', 'support'))
 ))
 config.substitutions.append(('%{link_flags}',
-    '-nostdlib++ {} {}'.format(
+    '-nostdlib++ {} {} -pthread'.format(
         os.path.join(INSTALL_ROOT, 'lib', 'libc++.a'),
         os.path.join(INSTALL_ROOT, 'lib', 'libc++abi.a'))
 ))

diff  --git a/libcxx/utils/ci/buildkite-pipeline.yml b/libcxx/utils/ci/buildkite-pipeline.yml
index e99cdaa76c543..cecff116b7e79 100644
--- a/libcxx/utils/ci/buildkite-pipeline.yml
+++ b/libcxx/utils/ci/buildkite-pipeline.yml
@@ -295,6 +295,17 @@ steps:
         - exit_status: -1  # Agent was lost
           limit: 2
 
+  - label: "Legacy Lit configuration"
+    command: "libcxx/utils/ci/run-buildbot legacy-test-config"
+    artifact_paths:
+      - "**/test-results.xml"
+    agents:
+      queue: "libcxx-builders"
+    retry:
+      automatic:
+        - exit_status: -1  # Agent was lost
+          limit: 2
+
   - label: "Legacy standalone build"
     command: "libcxx/utils/ci/run-buildbot legacy-standalone"
     artifact_paths:

diff  --git a/libcxx/utils/ci/run-buildbot b/libcxx/utils/ci/run-buildbot
index c781310d88f33..eaa20b8f8bf58 100755
--- a/libcxx/utils/ci/run-buildbot
+++ b/libcxx/utils/ci/run-buildbot
@@ -183,7 +183,8 @@ generic-cxx03)
     export CC=clang
     export CXX=clang++
     clean
-    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake"
+    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx03.cmake" \
+                   -DLIBCXX_TEST_CONFIG="${MONOREPO_ROOT}/libcxx/test/configs/libcxx-trunk-shared.cfg.in"
     check-cxx-cxxabi
     check-abi-list
 ;;
@@ -191,7 +192,8 @@ generic-cxx11)
     export CC=clang
     export CXX=clang++
     clean
-    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx11.cmake"
+    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx11.cmake" \
+                   -DLIBCXX_TEST_CONFIG="${MONOREPO_ROOT}/libcxx/test/configs/libcxx-trunk-shared.cfg.in"
     check-cxx-cxxabi
     check-abi-list
 ;;
@@ -199,7 +201,8 @@ generic-cxx14)
     export CC=clang
     export CXX=clang++
     clean
-    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx14.cmake"
+    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx14.cmake" \
+                   -DLIBCXX_TEST_CONFIG="${MONOREPO_ROOT}/libcxx/test/configs/libcxx-trunk-shared.cfg.in"
     check-cxx-cxxabi
     check-abi-list
 ;;
@@ -207,7 +210,8 @@ generic-cxx17)
     export CC=clang
     export CXX=clang++
     clean
-    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx17.cmake"
+    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx17.cmake" \
+                   -DLIBCXX_TEST_CONFIG="${MONOREPO_ROOT}/libcxx/test/configs/libcxx-trunk-shared.cfg.in"
     check-cxx-cxxabi
     check-abi-list
 ;;
@@ -215,7 +219,8 @@ generic-cxx20)
     export CC=clang
     export CXX=clang++
     clean
-    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx20.cmake"
+    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx20.cmake" \
+                   -DLIBCXX_TEST_CONFIG="${MONOREPO_ROOT}/libcxx/test/configs/libcxx-trunk-shared.cfg.in"
     check-cxx-cxxabi
     check-abi-list
 ;;
@@ -223,7 +228,8 @@ generic-cxx2b)
     export CC=clang-tot
     export CXX=clang++-tot
     clean
-    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx2b.cmake"
+    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-cxx2b.cmake" \
+                   -DLIBCXX_TEST_CONFIG="${MONOREPO_ROOT}/libcxx/test/configs/libcxx-trunk-shared.cfg.in"
     check-cxx-cxxabi
     check-abi-list
 ;;
@@ -246,7 +252,8 @@ generic-static)
     export CC=clang
     export CXX=clang++
     clean
-    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-static.cmake"
+    generate-cmake -C "${MONOREPO_ROOT}/libcxx/cmake/caches/Generic-static.cmake" \
+                   -DLIBCXX_TEST_CONFIG="${MONOREPO_ROOT}/libcxx/test/configs/libcxx-trunk-static.cfg.in"
     check-cxx-cxxabi
 ;;
 generic-32bit)
@@ -436,6 +443,13 @@ runtimes-build)
     echo "--- Installing libc++ and libc++abi to a fake location"
     ${NINJA} -C "${BUILD_DIR}" install-cxx install-cxxabi
 ;;
+legacy-test-config)
+    export CC=clang
+    export CXX=clang++
+    clean
+    generate-cmake -DLIBCXX_TEST_CONFIG="${MONOREPO_ROOT}/libcxx/test/configs/legacy.cfg.in"
+    check-cxx-cxxabi
+;;
 legacy-standalone)
     export CC=clang
     export CXX=clang++


        


More information about the libcxx-commits mailing list