diff --git a/CMakeLists.txt b/CMakeLists.txt index 81333987bed..2e2cf358e41 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -26,6 +26,7 @@ set(LLVM_MAIN_INCLUDE_DIR ${LLVM_MAIN_SRC_DIR}/include) set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR}) set(LLVM_TOOLS_BINARY_DIR ${LLVM_BINARY_DIR}/bin) set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples) +set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" ) set(LLVM_ALL_TARGETS Alpha @@ -186,11 +187,26 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 ) if( MSVC ) + # List of valid CRTs for MSVC + set(MSVC_CRT + MD + MDd) + + set(LLVM_USE_CRT "" CACHE STRING "Specify VC++ CRT to use for debug/release configurations.") add_llvm_definitions( -D_CRT_SECURE_NO_DEPRECATE -D_CRT_SECURE_NO_WARNINGS ) add_llvm_definitions( -D_SCL_SECURE_NO_WARNINGS -DCRT_NONSTDC_NO_WARNINGS ) add_llvm_definitions( -D_SCL_SECURE_NO_DEPRECATE ) add_llvm_definitions( -wd4146 -wd4503 -wd4996 -wd4800 -wd4244 -wd4624 ) add_llvm_definitions( -wd4355 -wd4715 -wd4180 -wd4345 -wd4224 ) + + if (NOT ${LLVM_USE_CRT} STREQUAL "") + list(FIND MSVC_CRT ${LLVM_USE_CRT} idx) + if (idx LESS 0) + message(FATAL_ERROR "Invalid value for LLVM_USE_CRT: ${LLVM_USE_CRT}. Valid options are one of: ${MSVC_CRT}") + endif (idx LESS 0) + add_llvm_definitions("/${LLVM_USE_CRT}") + message(STATUS "Using VC++ CRT: ${LLVM_USE_CRT}") + endif (NOT ${LLVM_USE_CRT} STREQUAL "") endif( MSVC ) include_directories( ${LLVM_BINARY_DIR}/include ${LLVM_MAIN_INCLUDE_DIR}) @@ -207,6 +223,8 @@ set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${LLVM_LIBS} ) set(LLVM_TABLEGEN "tblgen" CACHE STRING "Native TableGen executable. Saves building one when cross-compiling.") +# Effective tblgen executable to be used: +set(LLVM_TABLEGEN_EXE ${LLVM_TABLEGEN}) add_subdirectory(utils/TableGen) diff --git a/CREDITS.TXT b/CREDITS.TXT index 0beee20b8d2..76b7296bc2a 100644 --- a/CREDITS.TXT +++ b/CREDITS.TXT @@ -3,7 +3,7 @@ project. If you have contributed a patch or made some other contribution to LLVM, please submit a patch to this file to add yourself, and it will be done! -The list is sorted by name and formatted to allow easy grepping and +The list is sorted by surname and formatted to allow easy grepping and beautification by scripts. The fields are: name (N), email (E), web-address (W), PGP key ID and fingerprint (P), description (D), and snail-mail address (S). @@ -148,10 +148,6 @@ N: Patrick Jenkins E: patjenk@wam.umd.edu D: Nightly Tester -N: Brad Jones -E: kungfoomaster@nondot.org -D: Support for packed types - N: Dale Johannesen E: dalej@apple.com D: ARM constant islands improvements @@ -160,6 +156,10 @@ D: Rewrite X87 back end D: Use APFloat for floating point constants widely throughout compiler D: Implement X87 long double +N: Brad Jones +E: kungfoomaster@nondot.org +D: Support for packed types + N: Eric Kidd W: http://randomhacks.net/ D: llvm-config script @@ -231,6 +231,13 @@ N: Scott Michel E: scottm@aero.org D: Added STI Cell SPU backend. +N: Edward O'Callaghan +E: eocallaghan@auroraux.org +W: http://www.auroraux.org +D: Add Clang support with various other improvements to utils/NewNightlyTest.pl +D: Fix and maintain Solaris & AuroraUX support for llvm, various build warnings +D: and error clean ups. + N: Morten Ofstad E: morten@hue.no D: Visual C++ compatibility fixes @@ -266,6 +273,10 @@ N: Arnold Schwaighofer E: arnold.schwaighofer@gmail.com D: Tail call optimization for the x86 backend +N: Shantonu Sen +E: ssen@apple.com +D: Miscellaneous bug fixes + N: Anand Shukla E: ashukla@cs.uiuc.edu D: The `paths' pass @@ -290,8 +301,4 @@ D: Thread Local Storage implementation N: Bill Wendling E: isanbard@gmail.com -D: Machine LICM -D: Darwin exception handling -D: MMX & SSSE3 instructions -D: SPEC2006 support - +D: Bunches of stuff diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake index a21ed20d3ba..e5256746bcc 100755 --- a/cmake/modules/AddLLVM.cmake +++ b/cmake/modules/AddLLVM.cmake @@ -10,8 +10,8 @@ macro(add_llvm_library name) add_dependencies( ${name} ${LLVM_COMMON_DEPENDS} ) endif( LLVM_COMMON_DEPENDS ) install(TARGETS ${name} - LIBRARY DESTINATION lib - ARCHIVE DESTINATION lib) + LIBRARY DESTINATION lib${LLVM_LIBDIR_SUFFIX} + ARCHIVE DESTINATION lib${LLVM_LIBDIR_SUFFIX}) endmacro(add_llvm_library name) diff --git a/cmake/modules/AddPartiallyLinkedObject.cmake b/cmake/modules/AddPartiallyLinkedObject.cmake index d20666dd79f..0f92455eacd 100755 --- a/cmake/modules/AddPartiallyLinkedObject.cmake +++ b/cmake/modules/AddPartiallyLinkedObject.cmake @@ -38,5 +38,5 @@ macro(add_partially_linked_object lib) set( llvm_lib_targets ${llvm_lib_targets} ${tnplo} PARENT_SCOPE ) endif( ) install(FILES ${pll} - DESTINATION lib) + DESTINATION lib${LLVM_LIBDIR_SUFFIX}) endmacro(add_partially_linked_object lib) diff --git a/cmake/modules/CrossCompileLLVM.cmake b/cmake/modules/CrossCompileLLVM.cmake index f638d67a30d..138ff0e9fe6 100644 --- a/cmake/modules/CrossCompileLLVM.cmake +++ b/cmake/modules/CrossCompileLLVM.cmake @@ -1,7 +1,7 @@ if( ${LLVM_TABLEGEN} STREQUAL "tblgen" ) set(CX_NATIVE_TG_DIR "${CMAKE_BINARY_DIR}/native") - set(LLVM_TABLEGEN "${CX_NATIVE_TG_DIR}/bin/tblgen") + set(LLVM_TABLEGEN_EXE "${CX_NATIVE_TG_DIR}/bin/tblgen") add_custom_command(OUTPUT ${CX_NATIVE_TG_DIR} COMMAND ${CMAKE_COMMAND} -E make_directory ${CX_NATIVE_TG_DIR} @@ -13,12 +13,12 @@ if( ${LLVM_TABLEGEN} STREQUAL "tblgen" ) DEPENDS ${CX_NATIVE_TG_DIR} COMMENT "Configuring native TableGen...") - add_custom_command(OUTPUT ${LLVM_TABLEGEN} + add_custom_command(OUTPUT ${LLVM_TABLEGEN_EXE} COMMAND ${CMAKE_BUILD_TOOL} DEPENDS ${CX_NATIVE_TG_DIR}/CMakeCache.txt WORKING_DIRECTORY ${CX_NATIVE_TG_DIR}/utils/TableGen COMMENT "Building native TableGen...") - add_custom_target(NativeTableGen DEPENDS ${LLVM_TABLEGEN}) + add_custom_target(NativeTableGen DEPENDS ${LLVM_TABLEGEN_EXE}) add_dependencies(tblgen NativeTableGen) diff --git a/cmake/modules/TableGen.cmake b/cmake/modules/TableGen.cmake index adb22c726b9..16c732b0893 100644 --- a/cmake/modules/TableGen.cmake +++ b/cmake/modules/TableGen.cmake @@ -6,11 +6,11 @@ macro(tablegen ofn) file(GLOB all_tds "*.td") add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp - COMMAND ${LLVM_TABLEGEN} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} + COMMAND ${LLVM_TABLEGEN_EXE} ${ARGN} -I ${CMAKE_CURRENT_SOURCE_DIR} -I ${LLVM_MAIN_SRC_DIR}/lib/Target -I ${LLVM_MAIN_INCLUDE_DIR} ${CMAKE_CURRENT_SOURCE_DIR}/${LLVM_TARGET_DEFINITIONS} -o ${CMAKE_CURRENT_BINARY_DIR}/${ofn}.tmp - DEPENDS ${LLVM_TABLEGEN} ${all_tds} + DEPENDS tblgen ${all_tds} COMMENT "Building ${ofn}.tmp..." ) add_custom_command(OUTPUT ${CMAKE_CURRENT_BINARY_DIR}/${ofn} diff --git a/docs/CMake.html b/docs/CMake.html index ac3b57a8489..1f50d397f00 100644 --- a/docs/CMake.html +++ b/docs/CMake.html @@ -217,6 +217,11 @@
TODO
+See this + wiki page for generic instructions on how to cross-compile + with CMake. It goes into detailed explanations and may seem + daunting, but it is not. On the wiki page there are several + examples including toolchain files. Go directly to + this + section for a quick solution.
If a function that has an ssp attribute is inlined into a function
+
If a function that has an ssp attribute is inlined into a function
that doesn't have an ssp attribute, then the resulting function will
-have an ssp attribute.
If a function that has an sspreq attribute is inlined into a +If a function that has an sspreq attribute is inlined into a function that doesn't have an sspreq attribute or which has an ssp attribute, then the resulting function will have -an sspreq attribute.
When constructing the data layout for a given target, LLVM starts with a default set of specifications which are then (possibly) overriden by the @@ -1196,6 +1207,7 @@ are given in this list:
When LLVM is determining the alignment for a given type, it uses the following rules:
@@ -7209,7 +7221,7 @@ declare void @llvm.stackprotector( i8* <guard>, i8** <slot> ) Chris Lattner