Skip to content

Commit d5c2cca

Browse files
committed
Creating branches/google/testing and tags/google/testing/2017-11-14 from r317716
git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/google/testing@318248 91177308-0d34-0410-b5e6-96231b3b80d8
2 parents ce7676b + dcf64df commit d5c2cca

File tree

848 files changed

+32624
-10143
lines changed

Some content is hidden

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

848 files changed

+32624
-10143
lines changed

CMakeLists.txt

Lines changed: 18 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,26 +2,20 @@
22

33
cmake_minimum_required(VERSION 3.4.3)
44

5-
if(POLICY CMP0022)
6-
cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
7-
endif()
5+
cmake_policy(SET CMP0022 NEW)
86

9-
if (POLICY CMP0051)
10-
# CMake 3.1 and higher include generator expressions of the form
11-
# $<TARGETLIB:obj> in the SOURCES property. These need to be
12-
# stripped everywhere that access the SOURCES property, so we just
13-
# defer to the OLD behavior of not including generator expressions
14-
# in the output for now.
15-
cmake_policy(SET CMP0051 OLD)
16-
endif()
7+
cmake_policy(SET CMP0048 NEW)
178

18-
if(POLICY CMP0056)
19-
cmake_policy(SET CMP0056 NEW)
20-
endif()
9+
# CMake 3.1 and higher include generator expressions of the form
10+
# $<TARGETLIB:obj> in the SOURCES property. These need to be
11+
# stripped everywhere that access the SOURCES property, so we just
12+
# defer to the OLD behavior of not including generator expressions
13+
# in the output for now.
14+
cmake_policy(SET CMP0051 OLD)
2115

22-
if(POLICY CMP0057)
23-
cmake_policy(SET CMP0057 NEW)
24-
endif()
16+
cmake_policy(SET CMP0056 NEW)
17+
18+
cmake_policy(SET CMP0057 NEW)
2519

2620
if(NOT DEFINED LLVM_VERSION_MAJOR)
2721
set(LLVM_VERSION_MAJOR 6)
@@ -36,13 +30,6 @@ if(NOT DEFINED LLVM_VERSION_SUFFIX)
3630
set(LLVM_VERSION_SUFFIX svn)
3731
endif()
3832

39-
if (POLICY CMP0048)
40-
cmake_policy(SET CMP0048 NEW)
41-
set(cmake_3_0_PROJ_VERSION
42-
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH})
43-
set(cmake_3_0_LANGUAGES LANGUAGES)
44-
endif()
45-
4633
if (NOT PACKAGE_VERSION)
4734
set(PACKAGE_VERSION
4835
"${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}")
@@ -56,9 +43,8 @@ if ((CMAKE_GENERATOR MATCHES "Visual Studio") AND (CMAKE_GENERATOR_TOOLSET STREQ
5643
endif()
5744

5845
project(LLVM
59-
${cmake_3_0_PROJ_VERSION}
60-
${cmake_3_0_LANGUAGES}
61-
C CXX ASM)
46+
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}
47+
LANGUAGES C CXX ASM)
6248

6349
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
6450
message(STATUS "No build type selected, default to Debug")
@@ -193,6 +179,9 @@ set(CMAKE_MODULE_PATH
193179
# for use by clang_complete, YouCompleteMe, etc.
194180
set(CMAKE_EXPORT_COMPILE_COMMANDS 1)
195181

182+
option(LLVM_INSTALL_BINUTILS_SYMLINKS
183+
"Install symlinks from the binutils tool names to the corresponding LLVM tools." OFF)
184+
196185
option(LLVM_INSTALL_UTILS "Include utility binaries in the 'install' target." OFF)
197186

198187
option(LLVM_INSTALL_TOOLCHAIN_ONLY "Only include toolchain files in the 'install' target." OFF)
@@ -766,6 +755,7 @@ configure_file(
766755
add_custom_target(srpm
767756
COMMAND cpack -G TGZ --config CPackSourceConfig.cmake -B ${LLVM_SRPM_DIR}/SOURCES
768757
COMMAND rpmbuild -bs --define '_topdir ${LLVM_SRPM_DIR}' ${LLVM_SRPM_BINARY_SPECFILE})
758+
set_target_properties(srpm PROPERTIES FOLDER "Misc")
769759

770760

771761
# They are not referenced. See set_output_directory().
@@ -978,6 +968,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
978968
# Installing the headers needs to depend on generating any public
979969
# tablegen'd headers.
980970
add_custom_target(llvm-headers DEPENDS intrinsics_gen)
971+
set_target_properties(llvm-headers PROPERTIES FOLDER "Misc")
981972

982973
if (NOT CMAKE_CONFIGURATION_TYPES)
983974
add_custom_target(install-llvm-headers

cmake/config-ix.cmake

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -157,7 +157,7 @@ if( NOT PURE_WINDOWS AND NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
157157
set(HAVE_TERMINFO 0)
158158
endif()
159159

160-
find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2)
160+
find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c)
161161
set(LLVM_LIBXML2_ENABLED 0)
162162
set(LIBXML2_FOUND 0)
163163
if((LLVM_ENABLE_LIBXML2) AND ((CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) OR APPLE))

cmake/modules/AddOCaml.cmake

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -221,3 +221,4 @@ add_custom_target(ocaml_make_directory
221221
COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "${LLVM_LIBRARY_DIR}/ocaml/llvm")
222222
add_custom_target("ocaml_all")
223223
set_target_properties(ocaml_all PROPERTIES FOLDER "Misc")
224+
set_target_properties(ocaml_make_directory PROPERTIES FOLDER "Misc")

cmake/modules/CrossCompile.cmake

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,12 +16,15 @@ function(llvm_create_cross_target_internal target_name toolchain buildtype)
1616
COMMAND ${CMAKE_COMMAND} -E make_directory ${LLVM_${target_name}_BUILD}
1717
COMMENT "Creating ${LLVM_${target_name}_BUILD}...")
1818

19+
add_custom_target(CREATE_LLVM_${target_name}
20+
DEPENDS ${LLVM_${target_name}_BUILD})
21+
1922
add_custom_command(OUTPUT ${LLVM_${target_name}_BUILD}/CMakeCache.txt
2023
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
2124
${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
2225
-DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
2326
WORKING_DIRECTORY ${LLVM_${target_name}_BUILD}
24-
DEPENDS ${LLVM_${target_name}_BUILD}
27+
DEPENDS CREATE_LLVM_${target_name}
2528
COMMENT "Configuring ${target_name} LLVM...")
2629

2730
add_custom_target(CONFIGURE_LLVM_${target_name}

cmake/modules/HandleLLVMOptions.cmake

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -232,6 +232,10 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
232232
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32")
233233
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
234234
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -m32")
235+
236+
# FIXME: CMAKE_SIZEOF_VOID_P is still 8
237+
add_definitions(-D_LARGEFILE_SOURCE)
238+
add_definitions(-D_FILE_OFFSET_BITS=64)
235239
endif( LLVM_BUILD_32_BITS )
236240
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
237241

@@ -242,6 +246,7 @@ if (ANDROID AND (ANDROID_NATIVE_API_LEVEL LESS 24))
242246
set(LLVM_FORCE_SMALLFILE_FOR_ANDROID TRUE)
243247
endif()
244248
if( CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT LLVM_FORCE_SMALLFILE_FOR_ANDROID)
249+
# FIXME: It isn't handled in LLVM_BUILD_32_BITS.
245250
add_definitions( -D_LARGEFILE_SOURCE )
246251
add_definitions( -D_FILE_OFFSET_BITS=64 )
247252
endif()

cmake/modules/TableGen.cmake

Lines changed: 1 addition & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -110,19 +110,6 @@ function(add_public_tablegen_target target)
110110
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${target} PARENT_SCOPE)
111111
endfunction()
112112

113-
if(LLVM_USE_HOST_TOOLS AND NOT TARGET NATIVE_LIB_LLVMTABLEGEN)
114-
llvm_ExternalProject_BuildCmd(tblgen_build_cmd LLVMSupport
115-
${LLVM_NATIVE_BUILD}
116-
CONFIGURATION Release)
117-
add_custom_command(OUTPUT LIB_LLVMTABLEGEN
118-
COMMAND ${tblgen_build_cmd}
119-
DEPENDS CONFIGURE_LLVM_NATIVE
120-
WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
121-
COMMENT "Building libLLVMTableGen for native TableGen..."
122-
USES_TERMINAL)
123-
add_custom_target(NATIVE_LIB_LLVMTABLEGEN DEPENDS LIB_LLVMTABLEGEN)
124-
endif()
125-
126113
macro(add_tablegen target project)
127114
set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS})
128115
set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen)
@@ -166,7 +153,7 @@ macro(add_tablegen target project)
166153
CONFIGURATION Release)
167154
add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE}
168155
COMMAND ${tblgen_build_cmd}
169-
DEPENDS ${target} NATIVE_LIB_LLVMTABLEGEN
156+
DEPENDS CONFIGURE_LLVM_NATIVE ${target}
170157
WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
171158
COMMENT "Building native TableGen..."
172159
USES_TERMINAL)

docs/CMake.rst

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -224,6 +224,10 @@ LLVM-specific variables
224224
Generate build targets for the LLVM tools. Defaults to ON. You can use this
225225
option to disable the generation of build targets for the LLVM tools.
226226

227+
**LLVM_INSTALL_BINUTILS_SYMLINKS**:BOOL
228+
Install symlinks from the binutils tool names to the corresponding LLVM tools.
229+
For example, ar will be symlinked to llvm-ar.
230+
227231
**LLVM_BUILD_EXAMPLES**:BOOL
228232
Build LLVM examples. Defaults to OFF. Targets for building each example are
229233
generated in any case. See documentation for *LLVM_BUILD_TOOLS* above for more

docs/CMakeLists.txt

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ if (DOXYGEN_FOUND)
33
if (LLVM_ENABLE_DOXYGEN)
44
set(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
55
set(abs_top_builddir ${CMAKE_CURRENT_BINARY_DIR})
6-
6+
77
if (HAVE_DOT)
88
set(DOT ${LLVM_PATH_DOT})
99
endif()
@@ -21,20 +21,20 @@ if (LLVM_ENABLE_DOXYGEN)
2121
set(enable_external_search "NO")
2222
set(extra_search_mappings "")
2323
endif()
24-
24+
2525
# If asked, configure doxygen for the creation of a Qt Compressed Help file.
2626
option(LLVM_ENABLE_DOXYGEN_QT_HELP
2727
"Generate a Qt Compressed Help file." OFF)
2828
if (LLVM_ENABLE_DOXYGEN_QT_HELP)
2929
set(LLVM_DOXYGEN_QCH_FILENAME "org.llvm.qch" CACHE STRING
3030
"Filename of the Qt Compressed help file")
31-
set(LLVM_DOXYGEN_QHP_NAMESPACE "org.llvm" CACHE STRING
31+
set(LLVM_DOXYGEN_QHP_NAMESPACE "org.llvm" CACHE STRING
3232
"Namespace under which the intermediate Qt Help Project file lives")
3333
set(LLVM_DOXYGEN_QHP_CUST_FILTER_NAME "${PACKAGE_STRING}" CACHE STRING
3434
"See http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters")
3535
set(LLVM_DOXYGEN_QHP_CUST_FILTER_ATTRS "${PACKAGE_NAME},${PACKAGE_VERSION}" CACHE STRING
3636
"See http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes")
37-
find_program(LLVM_DOXYGEN_QHELPGENERATOR_PATH qhelpgenerator
37+
find_program(LLVM_DOXYGEN_QHELPGENERATOR_PATH qhelpgenerator
3838
DOC "Path to the qhelpgenerator binary")
3939
if (NOT LLVM_DOXYGEN_QHELPGENERATOR_PATH)
4040
message(FATAL_ERROR "Failed to find qhelpgenerator binary")
@@ -55,7 +55,7 @@ if (LLVM_ENABLE_DOXYGEN)
5555
set(llvm_doxygen_qhp_cust_filter_name "")
5656
set(llvm_doxygen_qhp_cust_filter_attrs "")
5757
endif()
58-
58+
5959
option(LLVM_DOXYGEN_SVG
6060
"Use svg instead of png files for doxygen graphs." OFF)
6161
if (LLVM_DOXYGEN_SVG)
@@ -113,6 +113,7 @@ if (LLVM_ENABLE_SPHINX)
113113
if (${SPHINX_OUTPUT_MAN})
114114
add_sphinx_target(man llvm)
115115
add_sphinx_target(man llvm-dwarfdump)
116+
add_sphinx_target(man dsymutil)
116117
endif()
117118

118119
endif()

docs/CommandGuide/FileCheck.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -86,6 +86,11 @@ OPTIONS
8686

8787
All other variables get undefined after each encountered ``CHECK-LABEL``.
8888

89+
.. option:: -D<VAR=VALUE>
90+
91+
Sets a filecheck variable ``VAR`` with value ``VALUE`` that can be used in
92+
``CHECK:`` lines.
93+
8994
.. option:: -version
9095

9196
Show the version number of this program.

docs/CommandGuide/dsymutil.rst

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
dsymutil - manipulate archived DWARF debug symbol files
2+
=======================================================
3+
4+
SYNOPSIS
5+
--------
6+
7+
| :program:`dsymutil` [*options*] *executable*
8+
9+
DESCRIPTION
10+
-----------
11+
12+
:program:`dsymutil` links the DWARF debug information found in the object files
13+
for an executable *executable* by using debug symbols information contained in
14+
its symbol table. By default, the linked debug information is placed in a
15+
``.dSYM`` bundle with the same name as the executable.
16+
17+
OPTIONS
18+
-------
19+
.. option:: --arch=<arch>
20+
21+
Link DWARF debug information only for specified CPU architecture types.
22+
Architectures may be specified by name. When using this option, an error will
23+
be returned if any architectures can not be properly linked. This option can
24+
be specified multiple times, once for each desired architecture. All CPU
25+
architectures will be linked by default and any architectures that can't be
26+
properly linked will cause :program:`dsymutil` to return an error.
27+
28+
.. option:: --dump-debug-map
29+
30+
Dump the *executable*'s debug-map (the list of the object files containing the
31+
debug information) in YAML format and exit. Not DWARF link will take place.
32+
33+
.. option:: -f, --flat
34+
35+
Produce a flat dSYM file. A ``.dwarf`` extension will be appended to the
36+
executable name unless the output file is specified using the -o option.
37+
38+
.. option:: --no-odr
39+
40+
Do not use ODR (One Definition Rule) for uniquing C++ types.
41+
42+
.. option:: --no-output
43+
44+
Do the link in memory, but do not emit the result file.
45+
46+
.. option:: --no-swiftmodule-timestamp
47+
48+
Don't check the timestamp for swiftmodule files.
49+
50+
.. option:: -j <n>, --num-threads=<n>
51+
52+
Specifies the maximum number (``n``) of simultaneous threads to use when
53+
linking multiple architectures.
54+
55+
.. option:: -o <filename>
56+
57+
Specifies an alternate ``path`` to place the dSYM bundle. The default dSYM
58+
bundle path is created by appending ``.dSYM`` to the executable name.
59+
60+
.. option:: --oso-prepend-path=<path>
61+
62+
Specifies a ``path`` to prepend to all debug symbol object file paths.
63+
64+
.. option:: -s, --symtab
65+
66+
Dumps the symbol table found in *executable* or object file(s) and exits.
67+
68+
.. option:: -v, --verbose
69+
70+
Display verbose information when linking.
71+
72+
.. option:: --version
73+
74+
Display the version of the tool.
75+
76+
.. option:: -y
77+
78+
Treat *executable* as a YAML debug-map rather than an executable.
79+
80+
EXIT STATUS
81+
-----------
82+
83+
:program:`dsymutil` returns 0 if the DWARF debug information was linked
84+
successfully. Otherwise, it returns 1.
85+
86+
SEE ALSO
87+
--------
88+
89+
:manpage:`llvm-dwarfdump(1)`

0 commit comments

Comments
 (0)