[PATCH] D61697: [lit] Disable test on darwin when building shared libs.

Don Hinton via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Wed May 8 13:53:09 PDT 2019


hintonda created this revision.
hintonda added a reviewer: zturner.
Herald added subscribers: llvm-commits, delcypher.
Herald added projects: clang, LLVM.

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.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D61697

Files:
  clang/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp
  llvm/utils/lit/lit/llvm/config.py


Index: llvm/utils/lit/lit/llvm/config.py
===================================================================
--- llvm/utils/lit/lit/llvm/config.py
+++ llvm/utils/lit/lit/llvm/config.py
@@ -52,6 +52,8 @@
             # 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')
Index: clang/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp
===================================================================
--- clang/test/Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp
+++ 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 <mock_vector>
 vector v;


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61697.198720.patch
Type: text/x-patch
Size: 1076 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190508/b9542aec/attachment.bin>


More information about the cfe-commits mailing list