[llvm] d66f9c4 - Fix build rules for LLVM_WITH_Z3 after D95727

Björn Pettersson A via llvm-commits llvm-commits at lists.llvm.org
Mon Apr 5 09:17:01 PDT 2021


> -----Original Message-----
> From: Tom Stellard <tstellar at redhat.com>
> Sent: den 5 april 2021 17:33
> To: Björn Pettersson A <bjorn.a.pettersson at ericsson.com>; Bjorn Pettersson
> <llvmlistbot at llvm.org>; llvm-commits at lists.llvm.org
> Subject: Re: [llvm] d66f9c4 - Fix build rules for LLVM_WITH_Z3 after D95727
> 
> On 4/3/21 3:26 AM, Bjorn Pettersson via llvm-commits wrote:
> >
> > Author: Bjorn Pettersson
> > Date: 2021-04-03T12:25:37+02:00
> > New Revision: d66f9c4f1e83e69abf75f97cb5f8fd1dc9422357
> >
> > URL: https://protect2.fireeye.com/v1/url?k=84f39636-db68af33-84f3d6ad-
> 86d2114eab2f-c2ee633528e04379&q=1&e=04b86e42-1c03-4225-8ea1-
> b18192838bcb&u=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm-
> project%2Fcommit%2Fd66f9c4f1e83e69abf75f97cb5f8fd1dc9422357
> > DIFF: https://protect2.fireeye.com/v1/url?k=02d386b7-5d48bfb2-02d3c62c-
> 86d2114eab2f-36386b27b93e0f82&q=1&e=04b86e42-1c03-4225-8ea1-
> b18192838bcb&u=https%3A%2F%2Fgithub.com%2Fllvm%2Fllvm-
> project%2Fcommit%2Fd66f9c4f1e83e69abf75f97cb5f8fd1dc9422357.diff
> >
> > LOG: Fix build rules for LLVM_WITH_Z3 after D95727
> >
> > Started to see build errors like this
> >
> > ../lib/Support/Z3Solver.cpp:19:10: fatal error: 'z3.h' file not found
> > #include <z3.h>
> >           ^~~~~~
> > 1 error generated.
> >
> > after commit 43ceb74eb1a5801662419fb66a6bf0d5414f1ec5.
> >
> 
> I'm going to revert this commit.  I'm not sure it is correct, and there are
> still issues with 43ceb74eb1a5801662419fb66a6bf0d5414f1ec5, so I need to
> revert
> that one too.
> 
> Can you send me the CMake arguments that you were using that uncovered the
> bug with 43ceb74eb1a5801662419fb66a6bf0d5414f1ec5?

cmake command:

CC='/app/llvm/8.0/bin/clang -march=corei7' CXX='/app/llvm/8.0/bin/clang++ -march=corei7' LDFLAGS='-L/app/llvm/8.0/lib64 -Wl,-R/app/llvm/8.0/lib64:/z3/4.8.8-1/lib64' PATH=/app/ninja/1.8.2/bin:$PATH  /app/vbuild/RHEL7-x86_64/cmake/3.16.4/bin/cmake /repo/llvm-upstream/llvm --debug-trycompile -G Ninja -DCMAKE_MAKE_PROGRAM=/app/ninja/1.8.2/bin/ninja -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=ON -DCMAKE_INSTALL_PREFIX=/compiler-clang -DLLVM_APPEND_VC_REV=OFF -DLLVM_ENABLE_ASSERTIONS=ON -DLLVM_ENABLE_WERROR=ON -DLLVM_ENABLE_PROJECTS='clang;clang-tools-extra;lld' -DLLVM_ENABLE_Z3_SOLVER=ON -DLLVM_Z3_INSTALL_DIR=/z3/4.8.8-1 -DLLVM_ENABLE_LIBPFM=OFF


> 
> -Tom
> 
> > The -isystem path to the Z3_INCLUDE_DIR wen't missing in the compile
> > commands. No idea why target_include_directories stopped working with
> > that commit, but using include_directories seem to work better.
> >
> > Added:
> >
> >
> > Modified:
> >      llvm/lib/Support/CMakeLists.txt
> >
> > Removed:
> >
> >
> >
> >
> ###########################################################################
> #####
> > diff  --git a/llvm/lib/Support/CMakeLists.txt
> b/llvm/lib/Support/CMakeLists.txt
> > index ddacb4feaa0f2..36919b25b0eff 100644
> > --- a/llvm/lib/Support/CMakeLists.txt
> > +++ b/llvm/lib/Support/CMakeLists.txt
> > @@ -274,8 +274,5 @@ if(LLVM_INTEGRATED_CRT_ALLOC)
> >   endif()
> >
> >   if(LLVM_WITH_Z3)
> > -  target_include_directories(LLVMSupport SYSTEM
> > -    PRIVATE
> > -    ${Z3_INCLUDE_DIR}
> > -    )
> > +  include_directories(SYSTEM ${Z3_INCLUDE_DIR})
> >   endif()
> >
> >
> >
> > _______________________________________________
> > llvm-commits mailing list
> > llvm-commits at lists.llvm.org
> > https://protect2.fireeye.com/v1/url?k=2d62f84f-72f9c14a-2d62b8d4-
> 86d2114eab2f-d76951788da7b896&q=1&e=04b86e42-1c03-4225-8ea1-
> b18192838bcb&u=https%3A%2F%2Flists.llvm.org%2Fcgi-
> bin%2Fmailman%2Flistinfo%2Fllvm-commits
> >



More information about the llvm-commits mailing list