Skip to content

Commit

Permalink
Vendor import of llvm RELEASE_360/rc1 tag r226102 (effectively, 3.6.0…
Browse files Browse the repository at this point in the history
  • Loading branch information
DimitryAndric committed Jan 18, 2015
1 parent 3c7e7a1 commit 081af4d
Show file tree
Hide file tree
Showing 5,921 changed files with 340,442 additions and 132,164 deletions.
The diff you're trying to view is too large. We only load the first 3000 changed files.
1 change: 1 addition & 0 deletions .clang-tidy
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Checks: '-*,clang-diagnostic-*,llvm-*,misc-*'
15 changes: 15 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,13 @@
#==============================================================================#
# Explicit files to ignore (only matches one).
#==============================================================================#
# Various tag programs
/tags
/TAGS
/GPATH
/GRTAGS
/GSYMS
/GTAGS
.gitusers
autom4te.cache
cscope.files
Expand All @@ -45,7 +52,15 @@ tools/clang
tools/lldb
# lld, which is tracked independently.
tools/lld
# llgo, which is tracked independently.
tools/llgo
# Polly, which is tracked independently.
tools/polly
# Sphinx build tree, if building in-source dir.
docs/_build

#==============================================================================#
# Files created in tree by the Go bindings.
#==============================================================================#
bindings/go/llvm/llvm_config.go
bindings/go/llvm/workdir
75 changes: 66 additions & 9 deletions CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,29 @@ else()
endif()
endif()

if(CMAKE_VERSION VERSION_LESS 3.1.20141117)
set(cmake_3_2_USES_TERMINAL)
else()
set(cmake_3_2_USES_TERMINAL USES_TERMINAL)
endif()

project(LLVM)

# The following only works with the Ninja generator in CMake >= 3.0.
set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING
"Define the maximum number of concurrent compilation jobs.")
if(LLVM_PARALLEL_COMPILE_JOBS)
set_property(GLOBAL APPEND PROPERTY JOB_POOLS compile_job_pool=${LLVM_PARALLEL_COMPILE_JOBS})
set(CMAKE_JOB_POOL_COMPILE compile_job_pool)
endif()

set(LLVM_PARALLEL_LINK_JOBS "" CACHE STRING
"Define the maximum number of concurrent link jobs.")
if(LLVM_PARALLEL_LINK_JOBS)
set_property(GLOBAL APPEND PROPERTY JOB_POOLS link_job_pool=${LLVM_PARALLEL_LINK_JOBS})
set(CMAKE_JOB_POOL_LINK link_job_pool)
endif()

# Add path for custom modules
set(CMAKE_MODULE_PATH
${CMAKE_MODULE_PATH}
Expand All @@ -26,11 +47,11 @@ set(CMAKE_MODULE_PATH
)

set(LLVM_VERSION_MAJOR 3)
set(LLVM_VERSION_MINOR 5)
set(LLVM_VERSION_PATCH 1)
set(LLVM_VERSION_MINOR 6)
set(LLVM_VERSION_PATCH 0)

if (NOT PACKAGE_VERSION)
set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}svn")
set(PACKAGE_VERSION "${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}")
endif()

option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
Expand Down Expand Up @@ -111,9 +132,11 @@ endif()

string(TOUPPER "${CMAKE_BUILD_TYPE}" uppercase_CMAKE_BUILD_TYPE)

set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )

# They are used as destination of target generators.
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib)
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
if(WIN32 OR CYGWIN)
# DLL platform -- put DLLs into bin.
set(LLVM_SHLIB_OUTPUT_INTDIR ${LLVM_RUNTIME_OUTPUT_INTDIR})
Expand All @@ -130,7 +153,6 @@ set(LLVM_BINARY_DIR ${CMAKE_CURRENT_BINARY_DIR} ) # --prefix

set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples)
set(LLVM_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include)
set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name (32/64)" )

set(LLVM_ALL_TARGETS
AArch64
Expand Down Expand Up @@ -208,6 +230,7 @@ else()
option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
endif()

option(LLVM_ENABLE_MODULES "Compile with C++ modules enabled." OFF)
option(LLVM_ENABLE_CXX1Y "Compile with C++1y enabled." OFF)
option(LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF)
option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
Expand Down Expand Up @@ -301,6 +324,12 @@ option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
option (LLVM_BUILD_EXTERNAL_COMPILER_RT
"Build compiler-rt as an external project." OFF)

option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" OFF)
option(LLVM_DISABLE_LLVM_DYLIB_ATEXIT "Disable llvm-shlib's atexit destructors." ON)
if(LLVM_DISABLE_LLVM_DYLIB_ATEXIT)
set(DISABLE_LLVM_DYLIB_ATEXIT 1)
endif()

# All options referred to from HandleLLVMOptions have to be specified
# BEFORE this include, otherwise options will not be correctly set on
# first cmake run
Expand All @@ -315,7 +344,9 @@ set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
include(HandleLLVMOptions)

# Verify that we can find a Python 2 interpreter. Python 3 is unsupported.
set(Python_ADDITIONAL_VERSIONS 2.7 2.6 2.5)
# FIXME: We should support systems with only Python 3, but that requires work
# on LLDB.
set(Python_ADDITIONAL_VERSIONS 2.7)
include(FindPythonInterp)
if( NOT PYTHONINTERP_FOUND )
message(FATAL_ERROR
Expand All @@ -324,6 +355,10 @@ if( NOT PYTHONINTERP_FOUND )
Please install Python or specify the PYTHON_EXECUTABLE CMake variable.")
endif()

if( ${PYTHON_VERSION_STRING} VERSION_LESS 2.7 )
message(FATAL_ERROR "Python 2.7 or newer is required")
endif()

######
# LLVMBuild Integration
#
Expand Down Expand Up @@ -449,26 +484,42 @@ configure_file(

# They are not referenced. See set_output_directory().
set( CMAKE_RUNTIME_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/bin )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib )
set( CMAKE_LIBRARY_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )
set( CMAKE_ARCHIVE_OUTPUT_DIRECTORY ${LLVM_BINARY_DIR}/lib${LLVM_LIBDIR_SUFFIX} )

set(CMAKE_BUILD_WITH_INSTALL_RPATH ON)
if (APPLE)
set(CMAKE_INSTALL_NAME_DIR "@rpath")
set(CMAKE_INSTALL_RPATH "@executable_path/../lib")
else(UNIX)
if(NOT DEFINED CMAKE_INSTALL_RPATH)
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib")
set(CMAKE_INSTALL_RPATH "\$ORIGIN/../lib${LLVM_LIBDIR_SUFFIX}")
if (${CMAKE_SYSTEM_NAME} MATCHES FreeBSD)
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -Wl,-z,origin")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -Wl,-z,origin")
endif()
endif(NOT DEFINED CMAKE_INSTALL_RPATH)
endif()

# Work around a broken bfd ld behavior. When linking a binary with a
# foo.so library, it will try to find any library that foo.so uses and
# check its symbols. This is wasteful (the check was done when foo.so
# was created) and can fail since it is not the dynamic linker and
# doesn't know how to handle search paths correctly.
if (UNIX AND NOT APPLE)
set(CMAKE_EXE_LINKER_FLAGS
"${CMAKE_EXE_LINKER_FLAGS} -Wl,-allow-shlib-undefined")
endif()

set(CMAKE_INCLUDE_CURRENT_DIR ON)

include_directories( ${LLVM_INCLUDE_DIR} ${LLVM_MAIN_INCLUDE_DIR})

# when crosscompiling import the executable targets from a file
if(CMAKE_CROSSCOMPILING)
include(CrossCompile)
endif(CMAKE_CROSSCOMPILING)

if( ${CMAKE_SYSTEM_NAME} MATCHES FreeBSD )
# On FreeBSD, /usr/local/* is not used by default. In order to build LLVM
# with libxml2, iconv.h, etc., we must add /usr/local paths.
Expand Down Expand Up @@ -521,6 +572,12 @@ if(LLVM_INCLUDE_TESTS)
add_subdirectory(utils/unittest)
endif()

foreach( binding ${LLVM_BINDINGS_LIST} )
if( EXISTS "${LLVM_MAIN_SRC_DIR}/bindings/${binding}/CMakeLists.txt" )
add_subdirectory(bindings/${binding})
endif()
endforeach()

add_subdirectory(projects)

if(WITH_POLLY)
Expand Down
48 changes: 32 additions & 16 deletions CODE_OWNERS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ what goes in or not.
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).
(S). Each entry should contain at least the (N), (E) and (D) fields.

N: Joe Abbey
E: jabbey@arxan.com
Expand All @@ -20,6 +20,10 @@ N: Rafael Avila de Espindola
E: rafael.espindola@gmail.com
D: Gold plugin (tools/gold/*)

N: Justin Bogner
E: mail@justinbogner.com
D: InstrProfiling and related parts of ProfileData

N: Chandler Carruth
E: chandlerc@gmail.com
E: chandlerc@google.com
Expand All @@ -29,43 +33,50 @@ N: Evan Cheng
E: evan.cheng@apple.com
D: ARM target, parts of code generator not covered by someone else

N: Renato Golin
E: renato.golin@linaro.org
D: ARM Linux support

N: Eric Christopher
E: echristo@gmail.com
D: Debug Information, autotools/configure/make build, inline assembly

N: Greg Clayton
E: gclayton@apple.com
D: LLDB

N: Marshall Clow
E: mclow.lists@gmail.com
D: libc++

N: Peter Collingbourne
D: libclc
E: peter@pcc.me.uk
D: llgo

N: Anshuman Dasgupta
E: adasgupt@codeaurora.org
D: Hexagon Backend

N: Duncan P. N. Exon Smith
E: dexonsmith@apple.com
D: Branch weights and BlockFrequencyInfo

N: Hal Finkel
E: hfinkel@anl.gov
D: BBVectorize, the loop reroller and the PowerPC target
D: BBVectorize, the loop reroller, alias analysis and the PowerPC target

N: Renato Golin
E: renato.golin@linaro.org
D: ARM Linux support

N: Venkatraman Govindaraju
E: venkatra@cs.wisc.edu
D: Sparc Backend (lib/Target/Sparc/*)

N: Tobias Grosser
E: tobias@grosser.es
D: Polly

N: James Grosbach
E: grosbach@apple.com
D: MC layer

N: Marshall Clow
E: mclow.lists@gmail.com
D: libc++

N: Justin Holewinski
E: jholewinski@nvidia.com
D: NVPTX Target (lib/Target/NVPTX/*)
Expand Down Expand Up @@ -99,7 +110,12 @@ N: Tim Northover
E: t.p.northover@gmail.com
D: AArch64 backend

N: Diego Novillo
E: dnovillo@google.com
D: SampleProfile and related parts of ProfileData

N: Jakob Olesen
E: stoklund@2pi.dk
D: Register allocators and TableGen

N: Richard Osborne
Expand All @@ -118,10 +134,6 @@ N: Daniel Sanders
E: daniel.sanders@imgtec.com
D: MIPS Backend (lib/Target/Mips/*)

N: Richard Sandiford
E: rsandifo@linux.vnet.ibm.com
D: SystemZ Backend

N: Duncan Sands
E: baldrick@free.fr
D: DragonEgg
Expand All @@ -137,7 +149,7 @@ D: Windows parts of Support, Object, ar, nm, objdump, ranlib, size
N: Tom Stellard
E: thomas.stellard@amd.com
E: mesa-dev@lists.freedesktop.org
D: R600 Backend
D: Release manager for the 3.5 branch, R600 Backend, libclc

N: Evgeniy Stepanov
E: eugenis@google.com
Expand All @@ -147,6 +159,10 @@ N: Andrew Trick
E: atrick@apple.com
D: IndVar Simplify, Loop Strength Reduction, Instruction Scheduling

N: Ulrich Weigand
E: uweigand@de.ibm.com
D: SystemZ Backend

N: Bill Wendling
E: isanbard@gmail.com
D: libLTO, IR Linker
Expand Down
12 changes: 10 additions & 2 deletions CREDITS.TXT
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,10 @@ N: Hal Finkel
E: hfinkel@anl.gov
D: Basic-block autovectorization, PowerPC backend improvements

N: Eric Fiselier
E: eric@efcs.ca
D: LIT patches and documentation.

N: Ryan Flynn
E: pizza@parseerror.com
D: Miscellaneous bug fixes
Expand Down Expand Up @@ -281,8 +285,11 @@ D: Backend for Qualcomm's Hexagon VLIW processor.

N: Bruno Cardoso Lopes
E: bruno.cardoso@gmail.com
W: http://www.brunocardoso.org
D: The Mips backend
I: bruno
W: http://brunocardoso.cc
D: Mips backend
D: Random ARM integrated assembler and assembly parser improvements
D: General X86 AVX1 support

N: Duraid Madina
E: duraid@octopus.com.au
Expand Down Expand Up @@ -456,3 +463,4 @@ D: Bunches of stuff
N: Bob Wilson
E: bob.wilson@acm.org
D: Advanced SIMD (NEON) support in the ARM backend.

12 changes: 7 additions & 5 deletions Makefile.config.in
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,8 @@ DOT := @DOT@
DOXYGEN := @DOXYGEN@
GROFF := @GROFF@
GZIPBIN := @GZIPBIN@
OCAMLC := @OCAMLC@
OCAMLOPT := @OCAMLOPT@
OCAMLDEP := @OCAMLDEP@
OCAMLDOC := @OCAMLDOC@
GO := @GO@
OCAMLFIND := @OCAMLFIND@
GAS := @GAS@
POD2HTML := @POD2HTML@
POD2MAN := @POD2MAN@
Expand All @@ -217,6 +215,9 @@ HAVE_DLOPEN := @HAVE_DLOPEN@
HAVE_PTHREAD := @HAVE_PTHREAD@
HAVE_TERMINFO := @HAVE_TERMINFO@

HAVE_OCAMLOPT := @HAVE_OCAMLOPT@
HAVE_OCAML_OUNIT := @HAVE_OCAML_OUNIT@

LIBS := @LIBS@

# Targets that are possible to build
Expand Down Expand Up @@ -370,7 +371,6 @@ HUGE_VAL_SANITY = @HUGE_VAL_SANITY@

# Bindings that we should build
BINDINGS_TO_BUILD := @BINDINGS_TO_BUILD@
ALL_BINDINGS := @ALL_BINDINGS@
OCAML_LIBDIR := @OCAML_LIBDIR@

# When compiling under Mingw/Cygwin, executables such as tblgen
Expand All @@ -396,6 +396,8 @@ COVERED_SWITCH_DEFAULT = @COVERED_SWITCH_DEFAULT@
NO_UNINITIALIZED = @NO_UNINITIALIZED@
# -Wno-maybe-uninitialized
NO_MAYBE_UNINITIALIZED = @NO_MAYBE_UNINITIALIZED@
# -Wno-comment
NO_COMMENT = @NO_COMMENT@

# Was polly found in tools/polly?
LLVM_HAS_POLLY = @LLVM_HAS_POLLY@
Expand Down
Loading

0 comments on commit 081af4d

Please sign in to comment.