From ed9c7ec73dfb4d0e96ca7d663e6304e70c08b495 Mon Sep 17 00:00:00 2001 From: Don Hinton Date: Thu, 13 Jun 2019 19:08:49 +0000 Subject: [PATCH] [lit] Disable test on darwin when building shared libs. Summary: This test fails to link shared libraries because tries to run a copied version of clang-check to see if the mock version of libcxx in the same directory can be loaded dynamically. Since the test is specifically designed not to look in the default just-built lib directory, it must be disabled when building with BUILD_SHARED_LIBS=ON. Currently only disabling it on Darwin and basing it on the enable_shared flag. Reviewed By: ilya-biryukov Tags: #clang, #llvm Differential Revision: https://reviews.llvm.org/D61697 llvm-svn: 363298 --- .../Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp | 2 ++ llvm/utils/lit/lit/llvm/config.py | 2 ++ 2 files changed, 4 insertions(+) diff --git a/clang/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp b/clang/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp index f6424380d719..26a6a8ad6e94 100644 --- a/clang/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp +++ b/clang/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp @@ -16,5 +16,7 @@ // // ^ -ccc-install-dir passed to unbreak tests on *BSD where // getMainExecutable() relies on real argv[0] being passed +// +// UNSUPPORTED: enable_shared #include vector v; diff --git a/llvm/utils/lit/lit/llvm/config.py b/llvm/utils/lit/lit/llvm/config.py index 6a0bfa1b2073..ea1a7b6e0cf1 100644 --- a/llvm/utils/lit/lit/llvm/config.py +++ b/llvm/utils/lit/lit/llvm/config.py @@ -48,6 +48,8 @@ class LLVMConfig(object): # We should standardize on the former. features.add('system-linker-mach-o') features.add('system-darwin') + if config.enable_shared: + features.add("enable_shared") elif platform.system() == 'Windows': # For tests that require Windows to run. features.add('system-windows')