Skip to content
This repository was archived by the owner on Sep 2, 2018. It is now read-only.

Commit c737a46

Browse files
author
Dylan McKay
committed
Merge branch 'master' into avr-support
2 parents 06faf0a + 4cb3509 commit c737a46

File tree

4,464 files changed

+218485
-73642
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

4,464 files changed

+218485
-73642
lines changed

.clang-tidy

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,11 @@ CheckOptions:
55
- key: readability-identifier-naming.EnumCase
66
value: CamelCase
77
- key: readability-identifier-naming.FunctionCase
8-
value: lowerCase
8+
value: camelBack
9+
- key: readability-identifier-naming.MemberCase
10+
value: CamelCase
11+
- key: readability-identifier-naming.ParameterCase
12+
value: CamelCase
913
- key: readability-identifier-naming.UnionCase
1014
value: CamelCase
1115
- key: readability-identifier-naming.VariableCase

.gitignore

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,8 @@ tools/llgo
6060
tools/polly
6161
# Sphinx build tree, if building in-source dir.
6262
docs/_build
63+
# VSCode config files.
64+
.vscode
6365

6466
#==============================================================================#
6567
# Files created in tree by the Go bindings.

CMakeLists.txt

Lines changed: 72 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,6 @@
22

33
cmake_minimum_required(VERSION 3.4.3)
44

5-
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
6-
message(STATUS "No build type selected, default to Debug")
7-
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (default Debug)")
8-
endif()
9-
105
if(POLICY CMP0022)
116
cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
127
endif()
@@ -21,10 +16,10 @@ if (POLICY CMP0051)
2116
endif()
2217

2318
if(NOT DEFINED LLVM_VERSION_MAJOR)
24-
set(LLVM_VERSION_MAJOR 3)
19+
set(LLVM_VERSION_MAJOR 4)
2520
endif()
2621
if(NOT DEFINED LLVM_VERSION_MINOR)
27-
set(LLVM_VERSION_MINOR 9)
22+
set(LLVM_VERSION_MINOR 0)
2823
endif()
2924
if(NOT DEFINED LLVM_VERSION_PATCH)
3025
set(LLVM_VERSION_PATCH 0)
@@ -50,19 +45,48 @@ project(LLVM
5045
${cmake_3_0_LANGUAGES}
5146
C CXX ASM)
5247

53-
if(APPLE)
54-
if(NOT CMAKE_LIBTOOL)
48+
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
49+
message(STATUS "No build type selected, default to Debug")
50+
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (default Debug)")
51+
endif()
52+
53+
# This should only apply if you are both on an Apple host, and targeting Apple.
54+
if(CMAKE_HOST_APPLE AND APPLE)
55+
if(NOT CMAKE_XCRUN)
56+
find_program(CMAKE_XCRUN NAMES xcrun)
57+
endif()
58+
if(CMAKE_XCRUN)
59+
execute_process(COMMAND ${CMAKE_XCRUN} -find libtool
60+
OUTPUT_VARIABLE CMAKE_LIBTOOL
61+
OUTPUT_STRIP_TRAILING_WHITESPACE)
62+
endif()
63+
64+
if(NOT CMAKE_LIBTOOL OR NOT EXISTS CMAKE_LIBTOOL)
5565
find_program(CMAKE_LIBTOOL NAMES libtool)
5666
endif()
67+
68+
get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
5769
if(CMAKE_LIBTOOL)
5870
set(CMAKE_LIBTOOL ${CMAKE_LIBTOOL} CACHE PATH "libtool executable")
5971
message(STATUS "Found libtool - ${CMAKE_LIBTOOL}")
60-
get_property(languages GLOBAL PROPERTY ENABLED_LANGUAGES)
6172
foreach(lang ${languages})
6273
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
6374
"${CMAKE_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
6475
endforeach()
6576
endif()
77+
78+
# If DYLD_LIBRARY_PATH is set we need to set it on archiver commands
79+
if(DYLD_LIBRARY_PATH)
80+
set(dyld_envar "DYLD_LIBRARY_PATH=${DYLD_LIBRARY_PATH}")
81+
foreach(lang ${languages})
82+
foreach(cmd ${CMAKE_${lang}_CREATE_STATIC_LIBRARY})
83+
list(APPEND CMAKE_${lang}_CREATE_STATIC_LIBRARY_NEW
84+
"${dyld_envar} ${cmd}")
85+
endforeach()
86+
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
87+
${CMAKE_${lang}_CREATE_STATIC_LIBRARY_NEW})
88+
endforeach()
89+
endif()
6690
endif()
6791

6892
# The following only works with the Ninja generator in CMake >= 3.0.
@@ -77,7 +101,27 @@ if(LLVM_PARALLEL_COMPILE_JOBS)
77101
endif()
78102
endif()
79103

80-
set(LLVM_BUILD_GLOBAL_ISEL OFF CACHE BOOL "Experimental: Build GlobalISel")
104+
# Build llvm with ccache if the package is present
105+
set(LLVM_CCACHE_BUILD OFF CACHE BOOL "Set to ON for a ccache enabled build")
106+
if(LLVM_CCACHE_BUILD)
107+
find_program(CCACHE_PROGRAM ccache)
108+
if(CCACHE_PROGRAM)
109+
set(LLVM_CCACHE_SIZE "" CACHE STRING "Size of ccache")
110+
set(LLVM_CCACHE_DIR "" CACHE STRING "Directory to keep ccached data")
111+
set(CCACHE_PROGRAM "CCACHE_CPP2=yes CCACHE_HASHDIR=yes ${CCACHE_PROGRAM}")
112+
if (LLVM_CCACHE_SIZE)
113+
set(CCACHE_PROGRAM "CCACHE_SIZE=${LLVM_CCACHE_SIZE} ${CCACHE_PROGRAM}")
114+
endif()
115+
if (LLVM_CCACHE_DIR)
116+
set(CCACHE_PROGRAM "CCACHE_DIR=${LLVM_CCACHE_DIR} ${CCACHE_PROGRAM}")
117+
endif()
118+
set_property(GLOBAL PROPERTY RULE_LAUNCH_COMPILE ${CCACHE_PROGRAM})
119+
else()
120+
message(FATAL_ERROR "Unable to find the program ccache. Set LLVM_CCACHE_BUILD to OFF")
121+
endif()
122+
endif()
123+
124+
option(LLVM_BUILD_GLOBAL_ISEL "Experimental: Build GlobalISel" OFF)
81125
if(LLVM_BUILD_GLOBAL_ISEL)
82126
add_definitions(-DLLVM_BUILD_GLOBAL_ISEL)
83127
endif()
@@ -225,6 +269,7 @@ set(LLVM_ALL_TARGETS
225269
AVR
226270
BPF
227271
Hexagon
272+
Lanai
228273
Mips
229274
MSP430
230275
NVPTX
@@ -293,7 +338,7 @@ else()
293338
endif()
294339
option(LLVM_ENABLE_CXX1Y "Compile with C++1y enabled." OFF)
295340
option(LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF)
296-
option(LLVM_ENABLE_LIBCXXABI "Use libc++abi when using libc++." OFF)
341+
option(LLVM_ENABLE_LLD "Use lld as C and C++ linker." OFF)
297342
option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
298343
option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
299344

@@ -410,6 +455,7 @@ option (LLVM_BUILD_DOCS "Build the llvm documentation." OFF)
410455
option (LLVM_INCLUDE_DOCS "Generate build targets for llvm documentation." ON)
411456
option (LLVM_ENABLE_DOXYGEN "Use doxygen to generate llvm API documentation." OFF)
412457
option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
458+
option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
413459

414460
option (LLVM_BUILD_EXTERNAL_COMPILER_RT
415461
"Build compiler-rt as an external project." OFF)
@@ -448,7 +494,7 @@ if (LLVM_BUILD_INSTRUMENTED OR LLVM_BUILD_INSTRUMENTED_COVERAGE)
448494
endif()
449495
if(NOT LLVM_PROFILE_FILE_PATTERN)
450496
if(NOT LLVM_PROFILE_DATA_DIR)
451-
set(LLVM_PROFILE_FILE_PATTERN "%${LLVM_PROFILE_MERGE_POOL_SIZE}m.profraw")
497+
file(TO_NATIVE_PATH "${LLVM_BINARY_DIR}/profiles/%${LLVM_PROFILE_MERGE_POOL_SIZE}m.profraw" LLVM_PROFILE_FILE_PATTERN)
452498
else()
453499
file(TO_NATIVE_PATH "${LLVM_PROFILE_DATA_DIR}/%${LLVM_PROFILE_MERGE_POOL_SIZE}m.profraw" LLVM_PROFILE_FILE_PATTERN)
454500
endif()
@@ -644,7 +690,7 @@ endif()
644690
# check its symbols. This is wasteful (the check was done when foo.so
645691
# was created) and can fail since it is not the dynamic linker and
646692
# doesn't know how to handle search paths correctly.
647-
if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS")
693+
if (UNIX AND NOT APPLE AND NOT ${CMAKE_SYSTEM_NAME} MATCHES "SunOS|AIX")
648694
set(CMAKE_EXE_LINKER_FLAGS
649695
"${CMAKE_EXE_LINKER_FLAGS} -Wl,-allow-shlib-undefined")
650696
endif()
@@ -698,6 +744,7 @@ if( MINGW )
698744
endif()
699745

700746
# Put this before tblgen. Else we have a circular dependence.
747+
add_subdirectory(lib/Demangle)
701748
add_subdirectory(lib/Support)
702749
add_subdirectory(lib/TableGen)
703750

@@ -723,6 +770,7 @@ if( LLVM_INCLUDE_UTILS )
723770
add_subdirectory(utils/not)
724771
add_subdirectory(utils/llvm-lit)
725772
add_subdirectory(utils/yaml-bench)
773+
add_subdirectory(utils/unittest)
726774
else()
727775
if ( LLVM_INCLUDE_TESTS )
728776
message(FATAL_ERROR "Including tests when not building utils will not work.
@@ -735,10 +783,6 @@ if (LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION)
735783
add_subdirectory(utils/LLVMVisualizers)
736784
endif()
737785

738-
if(LLVM_INCLUDE_TESTS)
739-
add_subdirectory(utils/unittest)
740-
endif()
741-
742786
foreach( binding ${LLVM_BINDINGS_LIST} )
743787
if( EXISTS "${LLVM_MAIN_SRC_DIR}/bindings/${binding}/CMakeLists.txt" )
744788
add_subdirectory(bindings/${binding})
@@ -780,14 +824,22 @@ if( LLVM_INCLUDE_TESTS )
780824
get_property(LLVM_LIT_PARAMS GLOBAL PROPERTY LLVM_LIT_PARAMS)
781825
get_property(LLVM_LIT_DEPENDS GLOBAL PROPERTY LLVM_LIT_DEPENDS)
782826
get_property(LLVM_LIT_EXTRA_ARGS GLOBAL PROPERTY LLVM_LIT_EXTRA_ARGS)
827+
get_property(LLVM_ADDITIONAL_TEST_TARGETS
828+
GLOBAL PROPERTY LLVM_ADDITIONAL_TEST_TARGETS)
829+
get_property(LLVM_ADDITIONAL_TEST_DEPENDS
830+
GLOBAL PROPERTY LLVM_ADDITIONAL_TEST_DEPENDS)
783831
add_lit_target(check-all
784832
"Running all regression tests"
785833
${LLVM_LIT_TESTSUITES}
786834
PARAMS ${LLVM_LIT_PARAMS}
787-
DEPENDS ${LLVM_LIT_DEPENDS}
835+
DEPENDS ${LLVM_LIT_DEPENDS} ${LLVM_ADDITIONAL_TEST_TARGETS}
788836
ARGS ${LLVM_LIT_EXTRA_ARGS}
789837
)
790-
add_custom_target(test-depends DEPENDS ${LLVM_LIT_DEPENDS})
838+
if(TARGET check-runtimes)
839+
add_dependencies(check-all check-runtimes)
840+
endif()
841+
add_custom_target(test-depends
842+
DEPENDS ${LLVM_LIT_DEPENDS} ${LLVM_ADDITIONAL_TEST_DEPENDS})
791843
set_target_properties(test-depends PROPERTIES FOLDER "Tests")
792844
endif()
793845

CODE_OWNERS.TXT

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ They are also the gatekeepers for their part of LLVM, with the final word on
44
what goes in or not.
55

66
The list is sorted by surname and formatted to allow easy grepping and
7-
beautification by scripts. The fields are: name (N), email (E), web-address
7+
beautification by scripts. The fields are: name (N), email (E), web-address
88
(W), PGP key ID and fingerprint (P), description (D), and snail-mail address
99
(S). Each entry should contain at least the (N), (E) and (D) fields.
1010

@@ -50,6 +50,10 @@ N: Quentin Colombet
5050
E: qcolombet@apple.com
5151
D: Register allocators
5252

53+
N: Simon Dardis
54+
E: simon.dardis@imgtec.com
55+
D: MIPS Backend (lib/Target/Mips/*)
56+
5357
N: Duncan P. N. Exon Smith
5458
E: dexonsmith@apple.com
5559
D: Branch weights and BlockFrequencyInfo
@@ -111,6 +115,10 @@ E: sabre@nondot.org
111115
W: http://nondot.org/~sabre/
112116
D: Everything not covered by someone else
113117

118+
N: Robert Lytton
119+
E: robert@xmos.com
120+
D: XCore Backend
121+
114122
N: David Majnemer
115123
E: david.majnemer@gmail.com
116124
D: IR Constant Folder, InstCombine
@@ -131,10 +139,6 @@ N: Jakob Olesen
131139
E: stoklund@2pi.dk
132140
D: TableGen
133141

134-
N: Richard Osborne
135-
E: richard@xmos.com
136-
D: XCore Backend
137-
138142
N: Krzysztof Parzyszek
139143
E: kparzysz@codeaurora.org
140144
D: Hexagon Backend
@@ -155,10 +159,6 @@ N: Nadav Rotem
155159
E: nadav.rotem@me.com
156160
D: X86 Backend, Loop Vectorizer
157161

158-
N: Daniel Sanders
159-
E: daniel.sanders@imgtec.com
160-
D: MIPS Backend (lib/Target/Mips/*)
161-
162162
N: Duncan Sands
163163
E: baldrick@free.fr
164164
D: DragonEgg
@@ -200,7 +200,7 @@ N: Hans Wennborg
200200
E: hans@chromium.org
201201
D: Release management (x.y.0 releases)
202202

203-
N: Peter Zotov
203+
N: whitequark
204204
E: whitequark@whitequark.org
205205
D: OCaml bindings
206206

CREDITS.TXT

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -370,6 +370,10 @@ N: Francois Pichet
370370
E: pichet2000@gmail.com
371371
D: MSVC support
372372

373+
N: Adrian Prantl
374+
E: aprantl@apple.com
375+
D: Debug Information
376+
373377
N: Vladimir Prus
374378
W: http://vladimir_prus.blogspot.com
375379
E: ghost@cs.msu.su

LICENSE.TXT

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -61,8 +61,6 @@ licenses, and/or restrictions:
6161

6262
Program Directory
6363
------- ---------
64-
Autoconf llvm/autoconf
65-
llvm/projects/ModuleMaker/autoconf
6664
Google Test llvm/utils/unittest/googletest
6765
OpenBSD regex llvm/lib/Support/{reg*, COPYRIGHT.regex}
6866
pyyaml tests llvm/test/YAMLParser/{*.data, LICENSE.TXT}

RELEASE_TESTERS.TXT

Lines changed: 57 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,57 @@
1+
This file is a list of the people responsible for ensuring that targets and
2+
environments get tested and validated during the release process.
3+
4+
They will also, in conjunction with the release manager and the code owners,
5+
accept patches into stable release branches, tag critical bugs and release
6+
stoppers as well as make sure that no regressions were observed on their
7+
targets since the last release.
8+
9+
N: Ben Pope
10+
E: benpope81@gmail.com
11+
T: x86
12+
O: Ubuntu
13+
14+
N: Sylvestre Ledru
15+
E: sylvestre@debian.org
16+
T: x86
17+
O: Debian
18+
19+
N: Nikola Smiljanic
20+
E: popizdeh@gmail.com
21+
T: x86
22+
O: OpenSUSE, Fedora
23+
24+
N: Brian Cain
25+
E: brian.cain@gmail.com
26+
T: x86
27+
O: SuSE Enterprise, CentOS
28+
29+
N: Bernhard Rosenkränzer
30+
E: bero@linaro.org
31+
T: x86
32+
O: OpenMandriva
33+
34+
N: Dimitry Andric
35+
E: dimitry@andric.com
36+
T: x86
37+
O: FreeBSD
38+
39+
N: Hans Wennborg
40+
E: hans@chromium.org
41+
T: x86
42+
O: Windows
43+
44+
N: Renato Golin
45+
E: renato.golin@linaro.org
46+
T: ARM
47+
O: Linux
48+
49+
N: Diana Picus
50+
E: diana.picus@linaro.org
51+
T: AArch64
52+
O: Linux
53+
54+
N: Vasileios Kalintiris
55+
E: Vasileios.Kalintiris@imgtec.com
56+
T: MIPS
57+
O: Linux

0 commit comments

Comments
 (0)