[all-commits] [llvm/llvm-project] f1ab60: Fix FindZ3.cmake to support static libraries and W...

tomasz-kaminski-sonarsource via All-commits all-commits at lists.llvm.org
Thu Jul 29 01:57:08 PDT 2021


  Branch: refs/heads/main
  Home:   https://github.com/llvm/llvm-project
  Commit: f1ab60e40d16970381a003e145be6d5932823597
      https://github.com/llvm/llvm-project/commit/f1ab60e40d16970381a003e145be6d5932823597
  Author: Tomasz KamiƄski <tomasz.kaminski at sonarsource.com>
  Date:   2021-07-29 (Thu, 29 Jul 2021)

  Changed paths:
    M llvm/cmake/modules/FindZ3.cmake

  Log Message:
  -----------
  Fix FindZ3.cmake to support static libraries and Windows

Use absolute path to link z3 to allow builds both on windows and linux
since the library name is platform dependent for Z3 (libz3 on Windows
and z3 on Linux) and MSVC does not recognized -L and -l options.
Fix CMAKE_CROSSCOMPILING that does not work correctly since it uses
Z3_BUILD_VERSION instead of Z3_BUILD_NUMBER
Fix building with the static version of z3 library (supersedes D80227).

 - Build the Z3 version detection code as C++, since the static
   library brings in libstdc++ symbols
 - Detect threading support and link against threading, in the
   (likely) case Z3 was built with threads

Exposed compilation error from building a program that is used to detect
z3 version in the warning message, to simplify troubleshooting.

Reviewed By: JDevlieghere

Differential Revision: https://reviews.llvm.org/D106131




More information about the All-commits mailing list