Skip to content

Commit 213e6f3

Browse files
committed
Updating branches/google/testing to r288672
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/google/testing@288952 91177308-0d34-0410-b5e6-96231b3b80d8
2 parents 4bd19b6 + 4b0a367 commit 213e6f3

File tree

2,143 files changed

+119850
-53250
lines changed

Some content is hidden

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

2,143 files changed

+119850
-53250
lines changed

CMakeLists.txt

Lines changed: 64 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -73,9 +73,22 @@ if(CMAKE_HOST_APPLE AND APPLE)
7373
if(CMAKE_LIBTOOL)
7474
set(CMAKE_LIBTOOL ${CMAKE_LIBTOOL} CACHE PATH "libtool executable")
7575
message(STATUS "Found libtool - ${CMAKE_LIBTOOL}")
76+
77+
execute_process(COMMAND ${CMAKE_LIBTOOL} -V
78+
OUTPUT_VARIABLE LIBTOOL_V_OUTPUT
79+
OUTPUT_STRIP_TRAILING_WHITESPACE)
80+
if("${LIBTOOL_V_OUTPUT}" MATCHES ".*cctools-([0-9.]+).*")
81+
string(REGEX REPLACE ".*cctools-([0-9.]+).*" "\\1" LIBTOOL_VERSION
82+
${LIBTOOL_V_OUTPUT})
83+
if(NOT LIBTOOL_VERSION VERSION_LESS "862")
84+
set(LIBTOOL_NO_WARNING_FLAG "-no_warning_for_no_symbols")
85+
endif()
86+
endif()
87+
7688
foreach(lang ${languages})
7789
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
78-
"${CMAKE_LIBTOOL} -static -o <TARGET> <LINK_FLAGS> <OBJECTS> ")
90+
"${CMAKE_LIBTOOL} -static ${LIBTOOL_NO_WARNING_FLAG} -o <TARGET> \
91+
<LINK_FLAGS> <OBJECTS> ")
7992
endforeach()
8093
endif()
8194

@@ -93,6 +106,32 @@ if(CMAKE_HOST_APPLE AND APPLE)
93106
endif()
94107
endif()
95108

109+
# Side-by-side subprojects layout: automatically set the
110+
# LLVM_EXTERNAL_${project}_SOURCE_DIR using LLVM_ALL_PROJECTS
111+
# This allows an easy way of setting up a build directory for llvm and another
112+
# one for llvm+clang+... using the same sources.
113+
set(LLVM_ALL_PROJECTS "clang;libcxx;libcxxabi;lldb;compiler-rt;lld;polly")
114+
set(LLVM_ENABLE_PROJECTS "" CACHE STRING
115+
"Semicolon-separated list of projects to build (${LLVM_ALL_PROJECTS}), or \"all\".")
116+
if( LLVM_ENABLE_PROJECTS STREQUAL "all" )
117+
set( LLVM_ENABLE_PROJECTS ${LLVM_ALL_PROJECTS})
118+
endif()
119+
foreach(proj ${LLVM_ENABLE_PROJECTS})
120+
set(PROJ_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${proj}")
121+
if(NOT EXISTS "${PROJ_DIR}" OR NOT IS_DIRECTORY "${PROJ_DIR}")
122+
message(FATAL_ERROR "LLVM_ENABLE_PROJECTS requests ${proj} but directory not found: ${PROJ_DIR}")
123+
endif()
124+
string(TOUPPER "${proj}" upper_proj)
125+
STRING(REGEX REPLACE "-" "_" upper_proj ${upper_proj})
126+
set(LLVM_EXTERNAL_${upper_proj}_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../${proj}")
127+
# There is a widely spread opinion that clang-tools-extra should be merged
128+
# into clang. The following simulates it by always enabling clang-tools-extra
129+
# when enabling clang.
130+
if (proj STREQUAL "clang")
131+
set(LLVM_EXTERNAL_CLANG_TOOLS_EXTRA_SOURCE_DIR "${CMAKE_CURRENT_SOURCE_DIR}/../clang-tools-extra")
132+
endif()
133+
endforeach()
134+
96135
# The following only works with the Ninja generator in CMake >= 3.0.
97136
set(LLVM_PARALLEL_COMPILE_JOBS "" CACHE STRING
98137
"Define the maximum number of concurrent compilation jobs.")
@@ -125,6 +164,20 @@ if(LLVM_CCACHE_BUILD)
125164
endif()
126165
endif()
127166

167+
option(LLVM_DEPENDENCY_DEBUGGING "Dependency debugging mode to verify correctly expressed library dependencies (Darwin only)" OFF)
168+
169+
# Some features of the LLVM build may be disallowed when dependency debugging is
170+
# enabled. In particular you cannot use ccache because we want to force compile
171+
# operations to always happen.
172+
if(LLVM_DEPENDENCY_DEBUGGING)
173+
if(NOT CMAKE_HOST_APPLE)
174+
message(FATAL_ERROR "Dependency debugging is only currently supported on Darwin hosts.")
175+
endif()
176+
if(LLVM_CCACHE_BUILD)
177+
message(FATAL_ERROR "Cannot enable dependency debugging while using ccache.")
178+
endif()
179+
endif()
180+
128181
option(LLVM_BUILD_GLOBAL_ISEL "Experimental: Build GlobalISel" OFF)
129182
if(LLVM_BUILD_GLOBAL_ISEL)
130183
add_definitions(-DLLVM_BUILD_GLOBAL_ISEL)
@@ -317,6 +370,8 @@ set(LLVM_TARGET_ARCH "host"
317370

318371
option(LLVM_ENABLE_TERMINFO "Use terminfo database if available." ON)
319372

373+
option(LLVM_ENABLE_LIBEDIT "Use libedit if available." ON)
374+
320375
option(LLVM_ENABLE_THREADS "Use threads if available." ON)
321376

322377
option(LLVM_ENABLE_ZLIB "Use zlib for compression/decompression if available." ON)
@@ -489,7 +544,7 @@ endif()
489544
option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" ${LLVM_BUILD_LLVM_DYLIB_default})
490545

491546
option(LLVM_OPTIMIZED_TABLEGEN "Force TableGen to be built with optimization" OFF)
492-
if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND LLVM_ENABLE_ASSERTIONS))
547+
if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND (LLVM_ENABLE_ASSERTIONS OR CMAKE_CONFIGURATION_TYPES)))
493548
set(LLVM_USE_HOST_TOOLS ON)
494549
endif()
495550

@@ -514,6 +569,10 @@ if (LLVM_BUILD_INSTRUMENTED OR LLVM_BUILD_INSTRUMENTED_COVERAGE)
514569
endif()
515570
endif()
516571

572+
if (LLVM_BUILD_STATIC)
573+
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
574+
endif()
575+
517576
# All options referred to from HandleLLVMOptions have to be specified
518577
# BEFORE this include, otherwise options will not be correctly set on
519578
# first cmake run
@@ -668,6 +727,9 @@ configure_file(
668727
configure_file(
669728
${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/llvm-config.h.cmake
670729
${LLVM_INCLUDE_DIR}/llvm/Config/llvm-config.h)
730+
configure_file(
731+
${LLVM_MAIN_INCLUDE_DIR}/llvm/Config/abi-breaking.h.cmake
732+
${LLVM_INCLUDE_DIR}/llvm/Config/abi-breaking.h)
671733
configure_file(
672734
${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/DataTypes.h.cmake
673735
${LLVM_INCLUDE_DIR}/llvm/Support/DataTypes.h)

CODE_OWNERS.TXT

Lines changed: 12 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,7 @@ D: llgo, libLTO (lib/LTO/* tools/lto/*)
5252

5353
N: Quentin Colombet
5454
55-
D: Register allocators
55+
D: Loop Strength Reduction, Register allocators
5656

5757
N: Simon Dardis
5858
@@ -110,6 +110,10 @@ N: Benjamin Kramer
110110
111111
D: DWARF Parser
112112

113+
N: Michael Kuperstein
114+
115+
D: Loop Vectorizer
116+
113117
N: Sergei Larin
114118
115119
D: VLIW Instruction Scheduling, Packetization
@@ -159,10 +163,6 @@ N: Chad Rosier
159163
160164
D: Fast-Isel
161165

162-
N: Nadav Rotem
163-
164-
D: X86 Backend, Loop Vectorizer
165-
166166
N: Duncan Sands
167167
168168
D: DragonEgg
@@ -188,16 +188,20 @@ N: Evgeniy Stepanov
188188
189189
D: MemorySanitizer (LLVM part)
190190

191+
N: Craig Topper
192+
193+
D: X86 Backend
194+
191195
N: Andrew Trick
192196
193-
D: Loop Strength Reduction, Instruction Scheduling
197+
D: Instruction Scheduling
194198

195199
N: Ulrich Weigand
196200
197201
D: SystemZ Backend
198202

199-
N: Bill Wendling
200-
E: isanbard@gmail.com
203+
N: Teresa Johnson
204+
E: tejohnson@google.com
201205
D: IR Linker
202206

203207
N: Hans Wennborg

CREDITS.TXT

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,6 @@ beautification by scripts. The fields are: name (N), email (E), web-address
88
(W), PGP key ID and fingerprint (P), description (D), snail-mail address
99
(S), and (I) IRC handle.
1010

11-
1211
N: Vikram Adve
1312
1413
W: http://www.cs.uiuc.edu/~vadve/
@@ -401,7 +400,7 @@ D: Fixes and improvements to the AArch64 backend
401400

402401
N: Nadav Rotem
403402
404-
D: X86 code generation improvements, Loop Vectorizer.
403+
D: X86 code generation improvements, Loop Vectorizer, SLP Vectorizer
405404

406405
N: Roman Samoilov
407406

bindings/go/llvm/IRBindings.cpp

Lines changed: 0 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -21,34 +21,6 @@
2121

2222
using namespace llvm;
2323

24-
void LLVMAddFunctionAttr2(LLVMValueRef Fn, uint64_t PA) {
25-
Function *Func = unwrap<Function>(Fn);
26-
const AttributeSet PAL = Func->getAttributes();
27-
AttrBuilder B(PA);
28-
const AttributeSet PALnew =
29-
PAL.addAttributes(Func->getContext(), AttributeSet::FunctionIndex,
30-
AttributeSet::get(Func->getContext(),
31-
AttributeSet::FunctionIndex, B));
32-
Func->setAttributes(PALnew);
33-
}
34-
35-
uint64_t LLVMGetFunctionAttr2(LLVMValueRef Fn) {
36-
Function *Func = unwrap<Function>(Fn);
37-
const AttributeSet PAL = Func->getAttributes();
38-
return PAL.Raw(AttributeSet::FunctionIndex);
39-
}
40-
41-
void LLVMRemoveFunctionAttr2(LLVMValueRef Fn, uint64_t PA) {
42-
Function *Func = unwrap<Function>(Fn);
43-
const AttributeSet PAL = Func->getAttributes();
44-
AttrBuilder B(PA);
45-
const AttributeSet PALnew =
46-
PAL.removeAttributes(Func->getContext(), AttributeSet::FunctionIndex,
47-
AttributeSet::get(Func->getContext(),
48-
AttributeSet::FunctionIndex, B));
49-
Func->setAttributes(PALnew);
50-
}
51-
5224
LLVMMetadataRef LLVMConstantAsMetadata(LLVMValueRef C) {
5325
return wrap(ConstantAsMetadata::get(unwrap<Constant>(C)));
5426
}

bindings/go/llvm/IRBindings.h

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -28,15 +28,6 @@ extern "C" {
2828

2929
typedef struct LLVMOpaqueMetadata *LLVMMetadataRef;
3030

31-
// These functions duplicate the LLVM*FunctionAttr functions in the stable C
32-
// API. We cannot use the existing functions because they take 32-bit attribute
33-
// values, and the Go bindings expose all of the LLVM attributes, some of which
34-
// have values >= 1<<32.
35-
36-
void LLVMAddFunctionAttr2(LLVMValueRef Fn, uint64_t PA);
37-
uint64_t LLVMGetFunctionAttr2(LLVMValueRef Fn);
38-
void LLVMRemoveFunctionAttr2(LLVMValueRef Fn, uint64_t PA);
39-
4031
LLVMMetadataRef LLVMConstantAsMetadata(LLVMValueRef Val);
4132

4233
LLVMMetadataRef LLVMMDString2(LLVMContextRef C, const char *Str, unsigned SLen);

0 commit comments

Comments
 (0)