Skip to content

Commit dc4b1c5

Browse files
committed
Creating branches/google/testing and tags/google/testing/ from r317203
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/google/testing@317856 91177308-0d34-0410-b5e6-96231b3b80d8
2 parents 73877b7 + 66af8bd commit dc4b1c5

File tree

11,622 files changed

+1370485
-397094
lines changed

Some content is hidden

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

11,622 files changed

+1370485
-397094
lines changed

.gitignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,8 +65,9 @@ tools/polly
6565
tools/avrlit
6666
# Sphinx build tree, if building in-source dir.
6767
docs/_build
68-
# VSCode config files.
68+
# VS2017 and VSCode config files.
6969
.vscode
70+
.vs
7071

7172
#==============================================================================#
7273
# Files created in tree by the Go bindings.

CMakeLists.txt

Lines changed: 70 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,16 @@ if (POLICY CMP0051)
1515
cmake_policy(SET CMP0051 OLD)
1616
endif()
1717

18+
if(POLICY CMP0056)
19+
cmake_policy(SET CMP0056 NEW)
20+
endif()
21+
1822
if(POLICY CMP0057)
1923
cmake_policy(SET CMP0057 NEW)
2024
endif()
2125

2226
if(NOT DEFINED LLVM_VERSION_MAJOR)
23-
set(LLVM_VERSION_MAJOR 5)
27+
set(LLVM_VERSION_MAJOR 6)
2428
endif()
2529
if(NOT DEFINED LLVM_VERSION_MINOR)
2630
set(LLVM_VERSION_MINOR 0)
@@ -44,6 +48,13 @@ if (NOT PACKAGE_VERSION)
4448
"${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}")
4549
endif()
4650

51+
if ((CMAKE_GENERATOR MATCHES "Visual Studio") AND (CMAKE_GENERATOR_TOOLSET STREQUAL ""))
52+
message(WARNING "Visual Studio generators use the x86 host compiler by "
53+
"default, even for 64-bit targets. This can result in linker "
54+
"instability and out of memory errors. To use the 64-bit "
55+
"host compiler, pass -Thost=x64 on the CMake command line.")
56+
endif()
57+
4758
project(LLVM
4859
${cmake_3_0_PROJ_VERSION}
4960
${cmake_3_0_LANGUAGES}
@@ -87,7 +98,7 @@ if(CMAKE_HOST_APPLE AND APPLE)
8798
set(LIBTOOL_NO_WARNING_FLAG "-no_warning_for_no_symbols")
8899
endif()
89100
endif()
90-
101+
91102
foreach(lang ${languages})
92103
set(CMAKE_${lang}_CREATE_STATIC_LIBRARY
93104
"${CMAKE_LIBTOOL} -static ${LIBTOOL_NO_WARNING_FLAG} -o <TARGET> \
@@ -169,11 +180,6 @@ if(LLVM_DEPENDENCY_DEBUGGING)
169180
endif()
170181
endif()
171182

172-
option(LLVM_BUILD_GLOBAL_ISEL "Experimental: Build GlobalISel" ON)
173-
if(LLVM_BUILD_GLOBAL_ISEL)
174-
add_definitions(-DLLVM_BUILD_GLOBAL_ISEL)
175-
endif()
176-
177183
option(LLVM_ENABLE_DAGISEL_COV "Debug: Prints tablegen patterns that were used for selecting" OFF)
178184

179185
# Add path for custom modules
@@ -199,11 +205,7 @@ endif()
199205
include(VersionFromVCS)
200206

201207
option(LLVM_APPEND_VC_REV
202-
"Append the version control system revision id to LLVM version" OFF)
203-
204-
if( LLVM_APPEND_VC_REV )
205-
add_version_info_from_vcs(PACKAGE_VERSION)
206-
endif()
208+
"Embed the version control system revision id in LLVM" ON)
207209

208210
set(PACKAGE_NAME LLVM)
209211
set(PACKAGE_STRING "${PACKAGE_NAME} ${PACKAGE_VERSION}")
@@ -239,11 +241,11 @@ endif()
239241
include(CPack)
240242

241243
# Sanity check our source directory to make sure that we are not trying to
242-
# generate an in-tree build (unless on MSVC_IDE, where it is ok), and to make
244+
# generate an in-source build (unless on MSVC_IDE, where it is ok), and to make
243245
# sure that we don't have any stray generated files lying around in the tree
244246
# (which would end up getting picked up by header search, instead of the correct
245247
# versions).
246-
if( CMAKE_SOURCE_DIR STREQUAL CMAKE_BINARY_DIR AND NOT MSVC_IDE )
248+
if( CMAKE_CURRENT_SOURCE_DIR STREQUAL CMAKE_CURRENT_BINARY_DIR AND NOT MSVC_IDE )
247249
message(FATAL_ERROR "In-source builds are not allowed.
248250
CMake would overwrite the makefiles distributed with LLVM.
249251
Please create a directory and run cmake from there, passing the path
@@ -281,6 +283,10 @@ set(LLVM_LIBDIR_SUFFIX "" CACHE STRING "Define suffix of library directory name
281283
set(LLVM_TOOLS_INSTALL_DIR "bin" CACHE STRING "Path for binary subdirectory (defaults to 'bin')")
282284
mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
283285

286+
set(LLVM_UTILS_INSTALL_DIR "bin" CACHE STRING
287+
"Path to install LLVM utilities (enabled by LLVM_INSTALL_UTILS=ON) (defaults to LLVM_TOOLS_INSTALL_DIR)")
288+
mark_as_advanced(LLVM_TOOLS_INSTALL_DIR)
289+
284290
# They are used as destination of target generators.
285291
set(LLVM_RUNTIME_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin)
286292
set(LLVM_LIBRARY_OUTPUT_INTDIR ${CMAKE_CURRENT_BINARY_DIR}/${CMAKE_CFG_INTDIR}/lib${LLVM_LIBDIR_SUFFIX})
@@ -303,6 +309,7 @@ set(LLVM_CMAKE_PATH ${LLVM_MAIN_SRC_DIR}/cmake/modules)
303309
set(LLVM_EXAMPLES_BINARY_DIR ${LLVM_BINARY_DIR}/examples)
304310
set(LLVM_INCLUDE_DIR ${CMAKE_CURRENT_BINARY_DIR}/include)
305311

312+
# List of all targets to be built by default:
306313
set(LLVM_ALL_TARGETS
307314
AArch64
308315
AMDGPU
@@ -314,7 +321,6 @@ set(LLVM_ALL_TARGETS
314321
MSP430
315322
NVPTX
316323
PowerPC
317-
RISCV
318324
Sparc
319325
SystemZ
320326
X86
@@ -352,6 +358,8 @@ set(LLVM_TARGET_ARCH "host"
352358

353359
option(LLVM_ENABLE_TERMINFO "Use terminfo database if available." ON)
354360

361+
option(LLVM_ENABLE_LIBXML2 "Use libxml2 if available." ON)
362+
355363
option(LLVM_ENABLE_LIBEDIT "Use libedit if available." ON)
356364

357365
option(LLVM_ENABLE_THREADS "Use threads if available." ON)
@@ -367,8 +375,6 @@ set(LLVM_TARGETS_TO_BUILD
367375
${LLVM_EXPERIMENTAL_TARGETS_TO_BUILD})
368376
list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD)
369377

370-
include(AddLLVMDefinitions)
371-
372378
option(LLVM_ENABLE_PIC "Build Position-Independent Code" ON)
373379
option(LLVM_ENABLE_WARNINGS "Enable compiler warnings." ON)
374380
option(LLVM_ENABLE_MODULES "Compile with C++ modules enabled." OFF)
@@ -380,17 +386,24 @@ else()
380386
option(LLVM_ENABLE_LOCAL_SUBMODULE_VISIBILITY "Compile with -fmodules-local-submodule-visibility." ON)
381387
endif()
382388
option(LLVM_ENABLE_CXX1Y "Compile with C++1y enabled." OFF)
389+
option(LLVM_ENABLE_CXX1Z "Compile with C++1z enabled." OFF)
383390
option(LLVM_ENABLE_LIBCXX "Use libc++ if available." OFF)
384391
option(LLVM_ENABLE_LLD "Use lld as C and C++ linker." OFF)
385392
option(LLVM_ENABLE_PEDANTIC "Compile with pedantic enabled." ON)
386393
option(LLVM_ENABLE_WERROR "Fail and stop if a warning is triggered." OFF)
387394

395+
option(LLVM_ENABLE_DUMP "Enable dump functions in release builds" OFF)
396+
388397
if( NOT uppercase_CMAKE_BUILD_TYPE STREQUAL "DEBUG" )
389398
option(LLVM_ENABLE_ASSERTIONS "Enable assertions" OFF)
390399
else()
391400
option(LLVM_ENABLE_ASSERTIONS "Enable assertions" ON)
392401
endif()
393402

403+
if( LLVM_ENABLE_ASSERTIONS )
404+
set(LLVM_ENABLE_DUMP ON)
405+
endif()
406+
394407
option(LLVM_ENABLE_EXPENSIVE_CHECKS "Enable expensive checks" OFF)
395408

396409
set(LLVM_ABI_BREAKING_CHECKS "WITH_ASSERTS" CACHE STRING
@@ -426,6 +439,8 @@ endif( LLVM_USE_OPROFILE )
426439

427440
set(LLVM_USE_SANITIZER "" CACHE STRING
428441
"Define the sanitizer used to build binaries and tests.")
442+
set(LLVM_LIB_FUZZING_ENGINE "" CACHE PATH
443+
"Path to fuzzing library for linking with fuzz targets")
429444

430445
option(LLVM_USE_SPLIT_DWARF
431446
"Use -gsplit-dwarf when compiling llvm." OFF)
@@ -485,6 +500,10 @@ option(LLVM_INCLUDE_UTILS "Generate build targets for the LLVM utils." ON)
485500
option(LLVM_BUILD_UTILS
486501
"Build LLVM utility binaries. If OFF, just generate build targets." ON)
487502

503+
option(LLVM_INCLUDE_RUNTIMES "Generate build targets for the LLVM runtimes." ON)
504+
option(LLVM_BUILD_RUNTIMES
505+
"Build the LLVM runtimes. If OFF, just generate build targets." ON)
506+
488507
option(LLVM_BUILD_RUNTIME
489508
"Build the LLVM runtime libraries." ON)
490509
option(LLVM_BUILD_EXAMPLES
@@ -510,6 +529,9 @@ set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html"
510529
option (LLVM_BUILD_EXTERNAL_COMPILER_RT
511530
"Build compiler-rt as an external project." OFF)
512531

532+
option (LLVM_VERSION_PRINTER_SHOW_HOST_TARGET_INFO
533+
"Show target and host info when tools are invoked with --version." ON)
534+
513535
# You can configure which libraries from LLVM you want to include in the
514536
# shared library by setting LLVM_DYLIB_COMPONENTS to a semi-colon delimited
515537
# list of LLVM components. All component names handled by llvm-config are valid.
@@ -525,6 +547,8 @@ if(LLVM_LINK_LLVM_DYLIB OR LLVM_BUILD_LLVM_C_DYLIB)
525547
endif()
526548
option(LLVM_BUILD_LLVM_DYLIB "Build libllvm dynamic library" ${LLVM_BUILD_LLVM_DYLIB_default})
527549

550+
option(LLVM_DYLIB_SYMBOL_VERSIONING OFF)
551+
528552
option(LLVM_OPTIMIZED_TABLEGEN "Force TableGen to be built with optimization" OFF)
529553
if(CMAKE_CROSSCOMPILING OR (LLVM_OPTIMIZED_TABLEGEN AND (LLVM_ENABLE_ASSERTIONS OR CMAKE_CONFIGURATION_TYPES)))
530554
set(LLVM_USE_HOST_TOOLS ON)
@@ -536,25 +560,29 @@ else()
536560
set(LLVM_ADD_NATIVE_VISUALIZERS_TO_SOLUTION FALSE CACHE INTERNAL "For Visual Studio 2013, manually copy natvis files to Documents\\Visual Studio 2013\\Visualizers" FORCE)
537561
endif()
538562

539-
if (LLVM_BUILD_INSTRUMENTED OR LLVM_BUILD_INSTRUMENTED_COVERAGE)
563+
if (LLVM_BUILD_INSTRUMENTED OR LLVM_BUILD_INSTRUMENTED_COVERAGE OR
564+
LLVM_ENABLE_IR_PGO)
540565
if(NOT LLVM_PROFILE_MERGE_POOL_SIZE)
541566
# A pool size of 1-2 is probably sufficient on a SSD. 3-4 should be fine
542567
# for spining disks. Anything higher may only help on slower mediums.
543568
set(LLVM_PROFILE_MERGE_POOL_SIZE "4")
544569
endif()
545570
if(NOT LLVM_PROFILE_FILE_PATTERN)
546571
if(NOT LLVM_PROFILE_DATA_DIR)
547-
file(TO_NATIVE_PATH "${LLVM_BINARY_DIR}/profiles/%${LLVM_PROFILE_MERGE_POOL_SIZE}m.profraw" LLVM_PROFILE_FILE_PATTERN)
548-
else()
549-
file(TO_NATIVE_PATH "${LLVM_PROFILE_DATA_DIR}/%${LLVM_PROFILE_MERGE_POOL_SIZE}m.profraw" LLVM_PROFILE_FILE_PATTERN)
572+
file(TO_NATIVE_PATH "${LLVM_BINARY_DIR}/profiles" LLVM_PROFILE_DATA_DIR)
550573
endif()
574+
file(TO_NATIVE_PATH "${LLVM_PROFILE_DATA_DIR}/%${LLVM_PROFILE_MERGE_POOL_SIZE}m.profraw" LLVM_PROFILE_FILE_PATTERN)
551575
endif()
552576
endif()
553577

554578
if (LLVM_BUILD_STATIC)
555579
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -static")
556580
endif()
557581

582+
# Override the default target with an environment variable named by LLVM_TARGET_TRIPLE_ENV.
583+
set(LLVM_TARGET_TRIPLE_ENV CACHE STRING "The name of environment variable to override default target. Disabled by blank.")
584+
mark_as_advanced(LLVM_TARGET_TRIPLE_ENV)
585+
558586
# All options referred to from HandleLLVMOptions have to be specified
559587
# BEFORE this include, otherwise options will not be correctly set on
560588
# first cmake run
@@ -620,7 +648,7 @@ endif (LLVM_USE_OPROFILE)
620648

621649
message(STATUS "Constructing LLVMBuild project information")
622650
execute_process(
623-
COMMAND ${PYTHON_EXECUTABLE} ${LLVMBUILDTOOL}
651+
COMMAND ${PYTHON_EXECUTABLE} -B ${LLVMBUILDTOOL}
624652
--native-target "${LLVM_NATIVE_ARCH}"
625653
--enable-targets "${LLVM_TARGETS_TO_BUILD}"
626654
--enable-optional-components "${LLVMOPTIONALCOMPONENTS}"
@@ -773,19 +801,20 @@ if(LLVM_USE_HOST_TOOLS)
773801
include(CrossCompile)
774802
endif(LLVM_USE_HOST_TOOLS)
775803
if(LLVM_TARGET_IS_CROSSCOMPILE_HOST)
776-
# Dummy use to avoid CMake Wraning: Manually-specified variables were not used
804+
# Dummy use to avoid CMake Warning: Manually-specified variables were not used
777805
# (this is a variable that CrossCompile sets on recursive invocations)
778806
endif()
779807

780808
if(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
781809
# On FreeBSD, /usr/local/* is not used by default. In order to build LLVM
782810
# with libxml2, iconv.h, etc., we must add /usr/local paths.
783-
include_directories("/usr/local/include")
811+
include_directories(SYSTEM "/usr/local/include")
784812
link_directories("/usr/local/lib")
785813
endif(${CMAKE_SYSTEM_NAME} MATCHES "(FreeBSD|DragonFly)")
786814

787815
if( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
788-
SET(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -include llvm/Support/Solaris.h")
816+
# special hack for Solaris to handle crazy system sys/regset.h
817+
include_directories("${LLVM_MAIN_INCLUDE_DIR}/llvm/Support/Solaris")
789818
endif( ${CMAKE_SYSTEM_NAME} MATCHES SunOS )
790819

791820
# Make sure we don't get -rdynamic in every binary. For those that need it,
@@ -819,15 +848,6 @@ add_subdirectory(lib/TableGen)
819848

820849
add_subdirectory(utils/TableGen)
821850

822-
# Force target to be built as soon as possible. Clang modules builds depend
823-
# header-wise on it as they ship all headers from the umbrella folders. Building
824-
# an entire module might include header, which depends on intrinsics_gen. This
825-
# should be right after LLVMSupport and LLVMTableGen otherwise we introduce a
826-
# circular dependence.
827-
if (LLVM_ENABLE_MODULES)
828-
list(APPEND LLVM_COMMON_DEPENDS intrinsics_gen)
829-
endif(LLVM_ENABLE_MODULES)
830-
831851
add_subdirectory(include/llvm)
832852

833853
add_subdirectory(lib)
@@ -837,9 +857,7 @@ if( LLVM_INCLUDE_UTILS )
837857
add_subdirectory(utils/PerfectShuffle)
838858
add_subdirectory(utils/count)
839859
add_subdirectory(utils/not)
840-
add_subdirectory(utils/llvm-lit)
841860
add_subdirectory(utils/yaml-bench)
842-
add_subdirectory(utils/unittest)
843861
else()
844862
if ( LLVM_INCLUDE_TESTS )
845863
message(FATAL_ERROR "Including tests when not building utils will not work.
@@ -864,7 +882,9 @@ if( LLVM_INCLUDE_TOOLS )
864882
add_subdirectory(tools)
865883
endif()
866884

867-
add_subdirectory(runtimes)
885+
if( LLVM_INCLUDE_RUNTIMES )
886+
add_subdirectory(runtimes)
887+
endif()
868888

869889
if( LLVM_INCLUDE_EXAMPLES )
870890
add_subdirectory(examples)
@@ -879,8 +899,13 @@ if( LLVM_INCLUDE_TESTS )
879899
NO_INSTALL
880900
ALWAYS_CLEAN)
881901
endif()
902+
add_subdirectory(utils/lit)
882903
add_subdirectory(test)
883904
add_subdirectory(unittests)
905+
if( LLVM_INCLUDE_UTILS )
906+
add_subdirectory(utils/unittest)
907+
endif()
908+
884909
if (WIN32)
885910
# This utility is used to prevent crashing tests from calling Dr. Watson on
886911
# Windows.
@@ -918,6 +943,11 @@ endif()
918943

919944
add_subdirectory(cmake/modules)
920945

946+
# Do this last so that all lit targets have already been created.
947+
if (LLVM_INCLUDE_UTILS)
948+
add_subdirectory(utils/llvm-lit)
949+
endif()
950+
921951
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
922952
install(DIRECTORY include/llvm include/llvm-c
923953
DESTINATION include
@@ -971,13 +1001,13 @@ if(LLVM_DISTRIBUTION_COMPONENTS)
9711001
if(TARGET ${target})
9721002
add_dependencies(distribution ${target})
9731003
else()
974-
message(FATAL_ERROR "Specified distribution component '${target}' doesn't have a target")
1004+
message(SEND_ERROR "Specified distribution component '${target}' doesn't have a target")
9751005
endif()
9761006

9771007
if(TARGET install-${target})
9781008
add_dependencies(install-distribution install-${target})
9791009
else()
980-
message(FATAL_ERROR "Specified distribution component '${target}' doesn't have an install target")
1010+
message(SEND_ERROR "Specified distribution component '${target}' doesn't have an install target")
9811011
endif()
9821012
endforeach()
9831013
endif()
@@ -986,3 +1016,4 @@ endif()
9861016
if (MSVC)
9871017
include(InstallRequiredSystemLibraries)
9881018
endif()
1019+

CODE_OWNERS.TXT

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -41,9 +41,13 @@ E: andrey.churbanov@intel.com
4141
D: OpenMP runtime library
4242

4343
N: Greg Clayton
44-
E: gclayton@apple.com
44+
E: clayborg@gmail.com
4545
D: LLDB
4646

47+
N: Pete Couperus
48+
E: petecoup@synopsys.com
49+
D: ARC backend (lib/Target/ARC/*)
50+
4751
N: Sanjoy Das
4852
E: sanjoy@playingwithpointers.com
4953
D: IndVar Simplify, Scalar Evolution
@@ -61,7 +65,7 @@ E: qcolombet@apple.com
6165
D: Loop Strength Reduction, Register allocators
6266

6367
N: Simon Dardis
64-
E: simon.dardis@imgtec.com
68+
E: simon.dardis@mips.com
6569
D: MIPS Backend (lib/Target/Mips/*)
6670

6771
N: Duncan P. N. Exon Smith
@@ -70,7 +74,7 @@ D: Branch weights and BlockFrequencyInfo
7074

7175
N: Hal Finkel
7276
E: hfinkel@anl.gov
73-
D: BBVectorize, the loop reroller, alias analysis and the PowerPC target
77+
D: The loop reroller, alias analysis and the PowerPC target
7478

7579
N: Dan Gohman
7680
E: sunfish@mozilla.com
@@ -195,6 +199,7 @@ D: MemorySanitizer (LLVM part)
195199

196200
N: Craig Topper
197201
E: craig.topper@gmail.com
202+
E: craig.topper@intel.com
198203
D: X86 Backend
199204

200205
N: Ulrich Weigand

0 commit comments

Comments
 (0)