mirror of
https://github.com/RPCS3/llvm-mirror.git
synced 2025-02-09 05:47:13 +00:00
Introduce a cmake LLVM_ENABLE_LIBCXX build parameter to compile using libc++ instead of the system default
Summary: This parameter is required to build C++11 projects (like lld or lldb) on OS X as the default STL does not provide c++ classes. CC: llvm-commits, triton Differential Revision: http://llvm-reviews.chandlerc.com/D2381 llvm-svn: 198625
This commit is contained in:
parent
a32cd9b466
commit
7d2d78de8b
@ -182,6 +182,7 @@ else( MSVC )
|
||||
endif()
|
||||
|
||||
option(LLVM_ENABLE_CXX11 "Compile with C++11 enabled." OFF)
|
||||
option(LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF)
|
||||
option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
|
||||
option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
|
||||
|
||||
|
@ -253,6 +253,13 @@ elseif( LLVM_COMPILER_IS_GCC_COMPATIBLE )
|
||||
check_cxx_compiler_flag("-std=c++11" CXX_SUPPORTS_CXX11)
|
||||
append_if(CXX_SUPPORTS_CXX11 "-std=c++11" CMAKE_CXX_FLAGS)
|
||||
endif (LLVM_ENABLE_CXX11)
|
||||
if(LLVM_ENABLE_LIBCXX)
|
||||
check_cxx_compiler_flag("-stdlib=libc++" CXX_SUPPORTS_STDLIB)
|
||||
append_if(CXX_SUPPORTS_STDLIB "-stdlib=libc++" CMAKE_CXX_FLAGS)
|
||||
append_if(CXX_SUPPORTS_STDLIB "-stdlib=libc++" CMAKE_EXE_LINKER_FLAGS)
|
||||
append_if(CXX_SUPPORTS_STDLIB "-stdlib=libc++" CMAKE_SHARED_LINKER_FLAGS)
|
||||
append_if(CXX_SUPPORTS_STDLIB "-stdlib=libc++" CMAKE_MODULE_LINKER_FLAGS)
|
||||
endif ()
|
||||
endif( MSVC )
|
||||
|
||||
macro(append_common_sanitizer_flags)
|
||||
|
Loading…
x
Reference in New Issue
Block a user