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
Loading
Please register or sign in to comment