diff options
author | Michael Kruse <llvm@meinersbur.de> | 2015-09-11 20:47:14 +0000 |
---|---|---|
committer | Michael Kruse <llvm@meinersbur.de> | 2015-09-11 20:47:14 +0000 |
commit | 84bf8a3bc41d82310d35f0f9c789ac673d8d1774 (patch) | |
tree | 0170a7d8617ccd9dee674fb8961de3c4b10f0dcd /clang/lib/CodeGen/CodeGenModule.cpp | |
parent | b00792e2dc7ac686d4812fd298259436baa84389 (diff) | |
download | llvm-84bf8a3bc41d82310d35f0f9c789ac673d8d1774.zip llvm-84bf8a3bc41d82310d35f0f9c789ac673d8d1774.tar.gz llvm-84bf8a3bc41d82310d35f0f9c789ac673d8d1774.tar.bz2 |
Introspect llvm-config --assertion-mode in cmake out-of-tree builds
When compiling Polly without LLVM sources but with system-installed
LLVM, the build process would not honor the LLVM_ENABLE_ASSERTIONS
setting LLVM was compiled with, but effectively assume that it is
switched off when compiling. During unit-tests llvm-lit would still
query the LLVM_ENABLE_ASSERTIONS flag and enable tests which require
assertions. Even if enabled for LLVM, Polly does not output its debug
info and statistics in this this mode such that 7 tests fail.
To fix, we query llvm-config --assertion-mode and if on, enable
assertions as HandleLLVMOptions.cmake would do.
We cannot reliably use HandleLLVMOptions.cmake itself as the host's
LLVM build might have been built using automake and distributions
change file locations (e.g. Debian to
/usr/share/llvm-${VERSION}/cmake/HandleLLVMOptions.cmake).
llvm-svn: 247470
Diffstat (limited to 'clang/lib/CodeGen/CodeGenModule.cpp')
0 files changed, 0 insertions, 0 deletions