[llvm-commits] [PATCH] Instead of failing the build when using a C++11-unaware compiler, skip building lld so we can at least proceed to stage2 of a bootstrap.
Alex Rosenberg
alexr at leftfield.org
Wed Jan 2 19:22:24 PST 2013
alexr added you to the CC list for the revision "Instead of failing the build when using a C++11-unaware compiler, skip building lld so we can at least proceed to stage2 of a bootstrap.".
Hi Bigcheese,
http://llvm-reviews.chandlerc.com/D260
Files:
CMakeLists.txt
Index: CMakeLists.txt
===================================================================
--- CMakeLists.txt
+++ CMakeLists.txt
@@ -1,7 +1,7 @@
# If we are not building as a part of LLVM, build lld as a standalone project,
# using LLVM as an external library.
-
+set(LLD_IS_BUILDABLE true)
if (CMAKE_SOURCE_DIR STREQUAL CMAKE_CURRENT_SOURCE_DIR)
project(lld)
@@ -80,6 +80,7 @@
set(CMAKE_CXX_FLAGS "-std=c++0x ${CMAKE_CXX_FLAGS}")
else( SUPPORTS_CXX11_FLAG )
message(WARNING "-std=c++0x not supported.")
+ set(LLD_IS_BUILDABLE false)
endif()
check_cxx_compiler_flag("-stdlib=libc++" SUPPORTS_LIBCXX_FLAG)
if( SUPPORTS_LIBCXX_FLAG )
@@ -128,23 +129,25 @@
set_target_properties(${name} PROPERTIES FOLDER "lld executables")
endmacro(add_lld_executable)
-include_directories(BEFORE
- ${CMAKE_CURRENT_BINARY_DIR}/include
- ${CMAKE_CURRENT_SOURCE_DIR}/include
- )
+if (LLD_IS_BUILDABLE)
+ include_directories(BEFORE
+ ${CMAKE_CURRENT_BINARY_DIR}/include
+ ${CMAKE_CURRENT_SOURCE_DIR}/include
+ )
-install(DIRECTORY include/
- DESTINATION include
- FILES_MATCHING
- PATTERN "*.h"
- PATTERN ".svn" EXCLUDE
- )
+ install(DIRECTORY include/
+ DESTINATION include
+ FILES_MATCHING
+ PATTERN "*.h"
+ PATTERN ".svn" EXCLUDE
+ )
-add_subdirectory(lib)
-add_subdirectory(tools)
+ add_subdirectory(lib)
+ add_subdirectory(tools)
-add_subdirectory(test)
+ add_subdirectory(test)
-if (LLVM_INCLUDE_TESTS AND NOT LLD_BUILT_STANDALONE)
- add_subdirectory(unittests)
+ if (LLVM_INCLUDE_TESTS AND NOT LLD_BUILT_STANDALONE)
+ add_subdirectory(unittests)
+ endif()
endif()
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D260.1.patch
Type: text/x-patch
Size: 1622 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20130102/b4ab156c/attachment.bin>
More information about the llvm-commits
mailing list