From 3869cebde3beb95e24e7b20e3cfe93ee2df4c02a Mon Sep 17 00:00:00 2001 From: Horst Schirmeier Date: Sun, 27 Apr 2014 17:31:47 +0200 Subject: [PATCH] util/llvmdisassembler: build with ac++-clang This change updates the documentation on how to manually build LLVM 3.3 or 3.4, and removes the forced -fno-rtti compiler flag from util/llvmdisassembler/: The flag breaks compilation with (not yet released) AspectC++ 2.0, which complains about dynamic_cast (used in some active aspect headers that should not affect llvmdisassembler at all) being unusable with -fno-rtti. It's probably not a good idea to compile only a part of Fail* with -fno-rtti anyways. Note that the Debian and Ubuntu LLVM packages are built with REQUIRES_RTTI=1, too. Change-Id: I9891cf074d4201df786f7f5a9b96033e18832562 --- doc/how-to-build.txt | 6 +++++- src/core/util/llvmdisassembler/CMakeLists.txt | 3 +-- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/doc/how-to-build.txt b/doc/how-to-build.txt index 4a49a25d..0c75d19b 100644 --- a/doc/how-to-build.txt +++ b/doc/how-to-build.txt @@ -19,9 +19,13 @@ Required for Fail*: . Make sure you use the 64-bit version if running in a 64-bit environment. - optional: - * LLVM 3.3 (needed for several importers in tools/import-trace) + * LLVM 3.3 or 3.4 (needed for several importers in tools/import-trace) (compiles/links with 3.1 or 3.2, but fails to properly import information from ELF binaries not compiled with -ffunction-sections) + - configured with, e.g., --enable-optimized --disable-assertions + --disable-werror + - built with "make REQUIRES_RTTI=1" (the Debian/Ubuntu packages already + come built this way) * a MySQL 5.0+ or MariaDB 5.1+ (MariaDB 5.5 recommended) server diff --git a/src/core/util/llvmdisassembler/CMakeLists.txt b/src/core/util/llvmdisassembler/CMakeLists.txt index 80f52b1d..3fe2a89e 100644 --- a/src/core/util/llvmdisassembler/CMakeLists.txt +++ b/src/core/util/llvmdisassembler/CMakeLists.txt @@ -11,8 +11,7 @@ set(SRCS include(FindLLVM) -# compiling without -fno-rtti fails even when LLVM is not built with that flag -set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLVM_CXX_FLAGS} -fno-rtti" ) +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLVM_CXX_FLAGS}" ) add_library(fail-llvmdisassembler ${SRCS}) target_link_libraries(fail-llvmdisassembler fail-sal)