aboutsummaryrefslogtreecommitdiff
path: root/CMakeLists.txt
diff options
context:
space:
mode:
authorNick Kledzik <kledzik@apple.com>2012-03-08 00:18:30 +0000
committerNick Kledzik <kledzik@apple.com>2012-03-08 00:18:30 +0000
commitc1845dd934457043742b173ec8d38ccda215577d (patch)
tree93d93c3d604a7b5bde9c84b163b94733a0e004f9 /CMakeLists.txt
parent200021c1cf8e237b0ecf02d292347ef670b8700f (diff)
Sources now require C++11 to build.
Add first linker pass (StubsPass) which looks for calls to shared library symbols and replaces them with calls to a StubAtom. On ELF system, a "stub" is a PLT entry. Added a simple test case. Pass a Platform object to YAML reader and writer for converting fixup kinds between names and values. Change output of Resolver to be a File object instead of a vector of Atoms. Thus, passes operate on a File instead of just Atoms. Rework how to walk through a File's Atoms. Now iterator based instead of a method that visits each atom. git-svn-id: https://llvm.org/svn/llvm-project/lld/trunk@152269 91177308-0d34-0410-b5e6-96231b3b80d8
Diffstat (limited to 'CMakeLists.txt')
-rw-r--r--CMakeLists.txt16
1 files changed, 16 insertions, 0 deletions
diff --git a/CMakeLists.txt b/CMakeLists.txt
index 4fe1e0117..c6409249f 100644
--- a/CMakeLists.txt
+++ b/CMakeLists.txt
@@ -1,6 +1,8 @@
# If we are not building as a part of LLVM, build lld as a standalone project,
# using LLVM as an external library.
+
+
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(lld)
cmake_minimum_required(VERSION 2.8)
@@ -58,6 +60,20 @@ if (CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR)
"`CMakeFiles'. Please delete them.")
endif()
+#
+# lld now requires C++11 to build
+#
+# set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS}")
+include(CheckCXXCompilerFlag)
+check_cxx_compiler_flag("-std=c++11" SUPPORTS_CXX11_FLAG)
+if( SUPPORTS_CXX11_FLAG )
+ message(STATUS "Building with -std=c++11")
+ set(CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}")
+else( SUPPORTS_CXX11_FLAG )
+ message(WARNING "-std=c++11 not supported.")
+endif()
+
+
macro(add_lld_library name)
llvm_process_sources(srcs ${ARGN})
if (MSVC_IDE OR XCODE)