From: Saleem Abdulrasool Date: Sat, 25 Apr 2015 02:06:15 +0000 (+0000) Subject: unwind: clean up warnings from the build X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=ea9c4fc75d5844bcbe50fec0ccefbee0a8d4c95b;p=platform%2Fupstream%2Fllvm.git unwind: clean up warnings from the build Now thta the build is split, clean up some of the warnings in the build: cc1: warning: command line option '-nostdinc++' is valid for C++/ObjC++ but not for C cc1: warning: command line option '-fno-rtti' is valid for C++/ObjC++ but not for C Append the C++ specific flags specifically to the C++ sources. Avoids the spurious warnings due to invalid flags being passed during the compilation of C++ sources. llvm-svn: 235797 --- diff --git a/libunwind/src/CMakeLists.txt b/libunwind/src/CMakeLists.txt index c4d1fbb..ee01e9a 100644 --- a/libunwind/src/CMakeLists.txt +++ b/libunwind/src/CMakeLists.txt @@ -65,7 +65,7 @@ target_link_libraries(unwind ${libraries}) # Setup flags. append_if(LIBUNWIND_COMPILE_FLAGS LIBUNWIND_HAS_FPIC_FLAG -fPIC) -append_if(LIBUNWIND_COMPILE_FLAGS LIBUNWIND_HAS_NO_RTTI_FLAG -fno-rtti) +append_if(LIBUNWIND_CXX_FLAGS LIBUNWIND_HAS_NO_RTTI_FLAG -fno-rtti) append_if(LIBUNWIND_LINK_FLAGS LIBUNWIND_HAS_NODEFAULTLIBS_FLAG -nodefaultlibs) @@ -93,6 +93,7 @@ if (APPLE) endif () string(REPLACE ";" " " LIBUNWIND_COMPILE_FLAGS "${LIBUNWIND_COMPILE_FLAGS}") +string(REPLACE ";" " " LIBUNWIND_CXX_FLAGS "${LIBUNWIND_CXX_FLAGS}") string(REPLACE ";" " " LIBUNWIND_LINK_FLAGS "${LIBUNWIND_LINK_FLAGS}") set_target_properties(unwind @@ -102,6 +103,8 @@ set_target_properties(unwind OUTPUT_NAME "unwind" VERSION "1.0" SOVERSION "1") +set_property(SOURCE ${LIBUNWIND_CXX_SOURCES} + APPEND_STRING PROPERTY COMPILE_FLAGS "${LIBUNWIND_CXX_FLAGS}") install(TARGETS unwind LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX}