PRUNERS / archer

Archer, a data race detection tool for large OpenMP applications
https://pruners.github.io/archer
Apache License 2.0
62 stars 13 forks source link

LLVM version checking in tools/archer/CMakeLists.txt #29

Closed peihunglin closed 7 years ago

peihunglin commented 7 years ago

Running in the following error:

llvm_src/tools/archer/lib/Transforms/Instrumentation/InstrumentParallel.cpp:58:15: error: virtual function 'getPassName' has a different return type ('const char *') than the function it overrides (which has return type 'llvm::StringRef')
  const char *getPassName() const override;
        ~~~~~~^
/nfs/casc/verification/tools/Archer/workspace/development/llvm_src/include/llvm/Pass.h:100:21: note: overridden virtual function is here
  virtual StringRef getPassName() const;
          ~~~~~~~~~ ^
1 error generated.

The following in tools/archer/CMakeLists.txt is only executed if ${ARCHER_STANDALONE_BUILD} is true:

string(SUBSTRING ${CMAKE_CXX_COMPILER_VERSION} 0 3 LLVM_VERSION)
string(REPLACE "." "" LLVM_VERSION ${LLVM_VERSION})
add_definitions(-DLLVM_VERSION=${LLVM_VERSION})

It should also be done if Archer is built as part of LLVM.

simoatze commented 7 years ago

@peihunglin good catch! Thanks, I'll fix this now!

simoatze commented 7 years ago

@peihunglin Are you using the "towards_tr4" branch?

peihunglin commented 7 years ago

Tried both master and towards_tr4 with LLVM release_40 and both have the same problem. My workaround is manually fixing that CMakeList.txt and that worked for me.

simoatze commented 7 years ago

Solved by the merge #30.