[Lldb-commits] [lldb] r209752 - Cmake build changes.
Reid Kleckner
rnk at google.com
Wed May 28 11:33:55 PDT 2014
It'd be really handy if we could sink this complexity down into the LLVM
cmake. However, I realize that's hard to do for the standalone lldb build.
On Wed, May 28, 2014 at 10:06 AM, Todd Fiala <todd.fiala at gmail.com> wrote:
> Author: tfiala
> Date: Wed May 28 12:06:04 2014
> New Revision: 209752
>
> URL: http://llvm.org/viewvc/llvm-project?rev=209752&view=rev
> Log:
> Cmake build changes.
>
> Disables exception handling in LLDB, using appropriate compiler
> flags depending on the platform. This is consistent with the build
> of LLVM, should improve performance, and also removes a substantial number
> of warnings from the Windows build.
>
> See http://reviews.llvm.org/D3929 for more details.
>
> Change by Zachary Turner
>
>
> Modified:
> lldb/trunk/CMakeLists.txt
>
> Modified: lldb/trunk/CMakeLists.txt
> URL:
> http://llvm.org/viewvc/llvm-project/lldb/trunk/CMakeLists.txt?rev=209752&r1=209751&r2=209752&view=diff
>
> ==============================================================================
> --- lldb/trunk/CMakeLists.txt (original)
> +++ lldb/trunk/CMakeLists.txt Wed May 28 12:06:04 2014
> @@ -153,6 +153,7 @@ if( MSVC )
> -wd4068 # Suppress 'warning C4068: unknown pragma'
> -wd4150 # Suppress 'warning C4150: deletion of pointer to incomplete
> type'
> -wd4521 # Suppress 'warning C4521: 'type' : multiple copy
> constructors specified'
> + -wd4530 # Suppress 'warning C4530: C++ exception handler used, but
> unwind semantics are not enabled.'
> )
> endif()
>
> @@ -290,21 +291,28 @@ if (CMAKE_SYSTEM_NAME MATCHES "Darwin")
> ${DEBUG_SYMBOLS_LIBRARY})
> endif()
>
> +if(LLDB_REQUIRES_EH)
> + set(LLDB_REQUIRES_RTTI ON)
> +else()
> + if(LLVM_COMPILER_IS_GCC_COMPATIBLE)
> + set(LLDB_COMPILE_FLAGS "${LLDB_COMPILE_FLAGS} -fno-exceptions")
> + elseif(MSVC)
> + add_definitions( -D_HAS_EXCEPTIONS=0 )
> + set(LLDB_COMPILE_FLAGS "${LLDB_COMPILE_FLAGS} /EHs-c-")
> + endif()
> +endif()
> +
> # Disable RTTI by default
> if(NOT LLDB_REQUIRES_RTTI)
> - if (NOT MSVC)
> - if ("${CMAKE_CXX_COMPILER_ID}" MATCHES "GNU" OR
> - "${CMAKE_CXX_COMPILER_ID}" MATCHES "Clang")
> - #gnu && clang compilers
> - set(LLDB_COMPILE_FLAGS "-fno-rtti")
> - endif() #GNU or CLANG
> - else()
> - #MSVC
> - set(LLDB_COMPILE_FLAGS "/GR-")
> - endif() #NOT MSVC
> - set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLDB_COMPILE_FLAGS}")
> + if (LLVM_COMPILER_IS_GCC_COMPATIBLE)
> + set(LLDB_COMPILE_FLAGS "${LLDB_COMPILE_FLAGS} -fno-rtti")
> + elseif(MSVC)
> + set(LLDB_COMPILE_FLAGS "${LLDB_COMPILE_FLAGS} /GR-")
> + endif()
> endif()
>
> +set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} ${LLDB_COMPILE_FLAGS}")
> +
> #add_subdirectory(include)
> add_subdirectory(docs)
> if (NOT CMAKE_SYSTEM_NAME MATCHES "Windows")
>
>
> _______________________________________________
> lldb-commits mailing list
> lldb-commits at cs.uiuc.edu
> http://lists.cs.uiuc.edu/mailman/listinfo/lldb-commits
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/lldb-commits/attachments/20140528/3ef33d31/attachment.html>
More information about the lldb-commits
mailing list