From c1845dd934457043742b173ec8d38ccda215577d Mon Sep 17 00:00:00 2001 From: Nick Kledzik Date: Thu, 8 Mar 2012 00:18:30 +0000 Subject: 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 --- CMakeLists.txt | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (limited to 'CMakeLists.txt') 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) -- cgit v1.2.3