How can I fix/exclude some failing tests when building with BUILD_SHARED_LIBS=ON

The test in question is clang-check-mac-libcxx-fixed-compilation-db.cpp which copies clang-check to a local directory to make sure clang can find libcxx via rpath.

However, when built with shared libs, the copy of clang-check can’t find any of it’s libraries, so I’d like to either turn if off when BUILD_SHARED_LIBS=ON, or find a way to fix it. Thought about trying to use DYLD_LIBRARY_PATH, but don’t think that’s the correct approach.

There are also a set of clang module tests that fail, as well as a few tools that build local without using llvm_add_library that I plan to fix, but I think this one is special due to the copy.

thanks in advance…

Tests just finished, and looks like most are clang, so adding cfe-dev.

Btw, here’s the full set of failing tests:

Failing Tests (8):
Clang :: CXX/modules-ts/basic/
Clang :: Modules/ExtDebugInfo.cpp
Clang :: Modules/using-directive-redecl.cpp
Clang :: Modules/using-directive.cpp
Clang :: PCH/chain-late-anonymous-namespace.cpp
Clang :: PCH/cxx-namespaces.cpp
Clang :: PCH/namespaces.cpp
Clang :: Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp

Still no idea why the module test fail, but here’s my attempt to fix Clang :: Tooling/clang-check-mac-libcxx-fixed-compilation-db.cpp: