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;
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;
_______________________________________________ cfe-commits mailing list cfe-commits@lists.llvm.org https://lists.llvm.org/cgi-bin/mailman/listinfo/cfe-commits