zig/cmake
Cody Tapscott 3f640ef3d2 CMake: Improve usage of llvm-config, esp. for consistent linking
This commit reworks the LLVM/Clang/LLD discovery process for CMake. The
biggest changes are that:
  1. We search for LLVM from most preferred directory to least, skipping
     any `llvm-config` that is the wrong version, or that doesn't
     support the requested link mode ("static" or "shared").
  2. `ZIG_PREFER_CLANG_CPP_DYLIB` has been renamed to `ZIG_SHARED_LLVM`,
     to better align with `ZIG_STATIC_LLVM`.
  3. We only search for LLVM in the same directory alongside LLVM.
  4. LLVM's link mode is forwarded to Clang, so that we can look for the
     appropriate shared/static libraries.
  5. We use `--link-static` when querying `--system-libs` from llvm-config,
     so that this will include libz and other dependencies for
     statically linking LLD
2022-07-23 08:52:30 -07:00
..
c_flag_overrides.cmake msvc: reduce inlining aggressivity to workaround a codegen bug in cl.exe cf. #3024 2019-10-16 19:04:50 -04:00
cxx_flag_overrides.cmake msvc: reduce inlining aggressivity to workaround a codegen bug in cl.exe cf. #3024 2019-10-16 19:04:50 -04:00
Findclang.cmake CMake: Improve usage of llvm-config, esp. for consistent linking 2022-07-23 08:52:30 -07:00
Findlld.cmake CMake: Improve usage of llvm-config, esp. for consistent linking 2022-07-23 08:52:30 -07:00
Findllvm.cmake CMake: Improve usage of llvm-config, esp. for consistent linking 2022-07-23 08:52:30 -07:00
install.cmake rename libuserland to libstage2 2020-02-16 19:16:08 -05:00