llvm.org GIT mirror llvm / db38106
Merging r245064: ------------------------------------------------------------------------ r245064 | cbieneman | 2015-08-14 09:20:31 -0700 (Fri, 14 Aug 2015) | 5 lines [CMake] Fix PR14200, llvm-config output misses -fno-rtti This change adds RTTI and Exception flags to llvm-config's cxxflags. This solution is a minimal patch to solve the issue, and is recommended for the 3.7 release branch. Tom Stellard's outstanding work is the longer term solution. Patch By: David Wiberg ------------------------------------------------------------------------ git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/release_37@245235 91177308-0d34-0410-b5e6-96231b3b80d8 Hans Wennborg 5 years ago
1 changed file(s) with 9 addition(s) and 6 deletion(s). Raw diff Collapse all Expand all
11
22 set(BUILDVARIABLES_SRCPATH ${CMAKE_CURRENT_SOURCE_DIR}/BuildVariables.inc.in)
33 set(BUILDVARIABLES_OBJPATH ${CMAKE_CURRENT_BINARY_DIR}/BuildVariables.inc)
4
5 # Add the llvm-config tool.
6 add_llvm_tool(llvm-config
7 llvm-config.cpp
8 )
49
510 # Compute the substitution values for various items.
611 get_property(LLVM_SYSTEM_LIBS_LIST TARGET LLVMSupport PROPERTY LLVM_SYSTEM_LIBS)
914 endforeach()
1015 string(REPLACE ";" " " SYSTEM_LIBS "${SYSTEM_LIBS}")
1116
17 # Fetch target specific compile options, e.g. RTTI option
18 get_property(COMPILE_FLAGS TARGET llvm-config PROPERTY COMPILE_FLAGS)
19
1220 # Use configure_file to create BuildVariables.inc.
1321 set(LLVM_SRC_ROOT ${LLVM_MAIN_SRC_DIR})
1422 set(LLVM_OBJ_ROOT ${LLVM_BINARY_DIR})
1523 set(LLVM_CPPFLAGS "${CMAKE_CPP_FLAGS} ${CMAKE_CPP_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
1624 set(LLVM_CFLAGS "${CMAKE_C_FLAGS} ${CMAKE_C_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
17 set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${LLVM_DEFINITIONS}")
25 set(LLVM_CXXFLAGS "${CMAKE_CXX_FLAGS} ${CMAKE_CXX_FLAGS_${uppercase_CMAKE_BUILD_TYPE}} ${COMPILE_FLAGS} ${LLVM_DEFINITIONS}")
1826 # Use the C++ link flags, since they should be a superset of C link flags.
1927 set(LLVM_LDFLAGS "${CMAKE_CXX_LINK_FLAGS}")
2028 set(LLVM_BUILDMODE ${CMAKE_BUILD_TYPE})
2432
2533 # Set build-time environment(s).
2634 add_definitions(-DCMAKE_CFG_INTDIR="${CMAKE_CFG_INTDIR}")
27
28 # Add the llvm-config tool.
29 add_llvm_tool(llvm-config
30 llvm-config.cpp
31 )
3235
3336 # Add the dependency on the generation step.
3437 add_file_dependencies(${CMAKE_CURRENT_SOURCE_DIR}/llvm-config.cpp ${BUILDVARIABLES_OBJPATH})