Skip to content
This repository has been archived by the owner on Apr 23, 2020. It is now read-only.

Commit

Permalink
Creating branches/google/testing and tags/google/testing/2017-11-14 f…
Browse files Browse the repository at this point in the history
…rom r317716

git-svn-id: https://llvm.org/svn/llvm-project/llvm/branches/google/testing@318248 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
dlj-NaN committed Nov 15, 2017
2 parents ce7676b + dcf64df commit d5c2cca
Show file tree
Hide file tree
Showing 848 changed files with 32,624 additions and 10,143 deletions.
45 changes: 18 additions & 27 deletions CMakeLists.txt
Expand Up @@ -2,26 +2,20 @@

cmake_minimum_required(VERSION 3.4.3)

if(POLICY CMP0022)
cmake_policy(SET CMP0022 NEW) # automatic when 2.8.12 is required
endif()
cmake_policy(SET CMP0022 NEW)

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

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

if(POLICY CMP0057)
cmake_policy(SET CMP0057 NEW)
endif()
cmake_policy(SET CMP0056 NEW)

cmake_policy(SET CMP0057 NEW)

if(NOT DEFINED LLVM_VERSION_MAJOR)
set(LLVM_VERSION_MAJOR 6)
Expand All @@ -36,13 +30,6 @@ if(NOT DEFINED LLVM_VERSION_SUFFIX)
set(LLVM_VERSION_SUFFIX svn)
endif()

if (POLICY CMP0048)
cmake_policy(SET CMP0048 NEW)
set(cmake_3_0_PROJ_VERSION
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH})
set(cmake_3_0_LANGUAGES LANGUAGES)
endif()

if (NOT PACKAGE_VERSION)
set(PACKAGE_VERSION
"${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}${LLVM_VERSION_SUFFIX}")
Expand All @@ -56,9 +43,8 @@ if ((CMAKE_GENERATOR MATCHES "Visual Studio") AND (CMAKE_GENERATOR_TOOLSET STREQ
endif()

project(LLVM
${cmake_3_0_PROJ_VERSION}
${cmake_3_0_LANGUAGES}
C CXX ASM)
VERSION ${LLVM_VERSION_MAJOR}.${LLVM_VERSION_MINOR}.${LLVM_VERSION_PATCH}
LANGUAGES C CXX ASM)

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

option(LLVM_INSTALL_BINUTILS_SYMLINKS
"Install symlinks from the binutils tool names to the corresponding LLVM tools." OFF)

option(LLVM_INSTALL_UTILS "Include utility binaries in the 'install' target." OFF)

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


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

if (NOT CMAKE_CONFIGURATION_TYPES)
add_custom_target(install-llvm-headers
Expand Down
2 changes: 1 addition & 1 deletion cmake/config-ix.cmake
Expand Up @@ -157,7 +157,7 @@ if( NOT PURE_WINDOWS AND NOT LLVM_USE_SANITIZER MATCHES "Memory.*")
set(HAVE_TERMINFO 0)
endif()

find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2)
find_library(ICONV_LIBRARY_PATH NAMES iconv libiconv libiconv-2 c)
set(LLVM_LIBXML2_ENABLED 0)
set(LIBXML2_FOUND 0)
if((LLVM_ENABLE_LIBXML2) AND ((CMAKE_SYSTEM_NAME MATCHES "Linux") AND (ICONV_LIBRARY_PATH) OR APPLE))
Expand Down
1 change: 1 addition & 0 deletions cmake/modules/AddOCaml.cmake
Expand Up @@ -221,3 +221,4 @@ add_custom_target(ocaml_make_directory
COMMAND "${CMAKE_COMMAND}" "-E" "make_directory" "${LLVM_LIBRARY_DIR}/ocaml/llvm")
add_custom_target("ocaml_all")
set_target_properties(ocaml_all PROPERTIES FOLDER "Misc")
set_target_properties(ocaml_make_directory PROPERTIES FOLDER "Misc")
5 changes: 4 additions & 1 deletion cmake/modules/CrossCompile.cmake
Expand Up @@ -16,12 +16,15 @@ function(llvm_create_cross_target_internal target_name toolchain buildtype)
COMMAND ${CMAKE_COMMAND} -E make_directory ${LLVM_${target_name}_BUILD}
COMMENT "Creating ${LLVM_${target_name}_BUILD}...")

add_custom_target(CREATE_LLVM_${target_name}
DEPENDS ${LLVM_${target_name}_BUILD})

add_custom_command(OUTPUT ${LLVM_${target_name}_BUILD}/CMakeCache.txt
COMMAND ${CMAKE_COMMAND} -G "${CMAKE_GENERATOR}"
${CROSS_TOOLCHAIN_FLAGS_${target_name}} ${CMAKE_SOURCE_DIR}
-DLLVM_TARGET_IS_CROSSCOMPILE_HOST=TRUE
WORKING_DIRECTORY ${LLVM_${target_name}_BUILD}
DEPENDS ${LLVM_${target_name}_BUILD}
DEPENDS CREATE_LLVM_${target_name}
COMMENT "Configuring ${target_name} LLVM...")

add_custom_target(CONFIGURE_LLVM_${target_name}
Expand Down
5 changes: 5 additions & 0 deletions cmake/modules/HandleLLVMOptions.cmake
Expand Up @@ -232,6 +232,10 @@ if( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )
set(CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32")
set(CMAKE_MODULE_LINKER_FLAGS "${CMAKE_MODULE_LINKER_FLAGS} -m32")

# FIXME: CMAKE_SIZEOF_VOID_P is still 8
add_definitions(-D_LARGEFILE_SOURCE)
add_definitions(-D_FILE_OFFSET_BITS=64)
endif( LLVM_BUILD_32_BITS )
endif( CMAKE_SIZEOF_VOID_P EQUAL 8 AND NOT WIN32 )

Expand All @@ -242,6 +246,7 @@ if (ANDROID AND (ANDROID_NATIVE_API_LEVEL LESS 24))
set(LLVM_FORCE_SMALLFILE_FOR_ANDROID TRUE)
endif()
if( CMAKE_SIZEOF_VOID_P EQUAL 4 AND NOT LLVM_FORCE_SMALLFILE_FOR_ANDROID)
# FIXME: It isn't handled in LLVM_BUILD_32_BITS.
add_definitions( -D_LARGEFILE_SOURCE )
add_definitions( -D_FILE_OFFSET_BITS=64 )
endif()
Expand Down
15 changes: 1 addition & 14 deletions cmake/modules/TableGen.cmake
Expand Up @@ -110,19 +110,6 @@ function(add_public_tablegen_target target)
set(LLVM_COMMON_DEPENDS ${LLVM_COMMON_DEPENDS} ${target} PARENT_SCOPE)
endfunction()

if(LLVM_USE_HOST_TOOLS AND NOT TARGET NATIVE_LIB_LLVMTABLEGEN)
llvm_ExternalProject_BuildCmd(tblgen_build_cmd LLVMSupport
${LLVM_NATIVE_BUILD}
CONFIGURATION Release)
add_custom_command(OUTPUT LIB_LLVMTABLEGEN
COMMAND ${tblgen_build_cmd}
DEPENDS CONFIGURE_LLVM_NATIVE
WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
COMMENT "Building libLLVMTableGen for native TableGen..."
USES_TERMINAL)
add_custom_target(NATIVE_LIB_LLVMTABLEGEN DEPENDS LIB_LLVMTABLEGEN)
endif()

macro(add_tablegen target project)
set(${target}_OLD_LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS})
set(LLVM_LINK_COMPONENTS ${LLVM_LINK_COMPONENTS} TableGen)
Expand Down Expand Up @@ -166,7 +153,7 @@ macro(add_tablegen target project)
CONFIGURATION Release)
add_custom_command(OUTPUT ${${project}_TABLEGEN_EXE}
COMMAND ${tblgen_build_cmd}
DEPENDS ${target} NATIVE_LIB_LLVMTABLEGEN
DEPENDS CONFIGURE_LLVM_NATIVE ${target}
WORKING_DIRECTORY ${LLVM_NATIVE_BUILD}
COMMENT "Building native TableGen..."
USES_TERMINAL)
Expand Down
4 changes: 4 additions & 0 deletions docs/CMake.rst
Expand Up @@ -224,6 +224,10 @@ LLVM-specific variables
Generate build targets for the LLVM tools. Defaults to ON. You can use this
option to disable the generation of build targets for the LLVM tools.

**LLVM_INSTALL_BINUTILS_SYMLINKS**:BOOL
Install symlinks from the binutils tool names to the corresponding LLVM tools.
For example, ar will be symlinked to llvm-ar.

**LLVM_BUILD_EXAMPLES**:BOOL
Build LLVM examples. Defaults to OFF. Targets for building each example are
generated in any case. See documentation for *LLVM_BUILD_TOOLS* above for more
Expand Down
11 changes: 6 additions & 5 deletions docs/CMakeLists.txt
Expand Up @@ -3,7 +3,7 @@ if (DOXYGEN_FOUND)
if (LLVM_ENABLE_DOXYGEN)
set(abs_top_srcdir ${CMAKE_CURRENT_SOURCE_DIR})
set(abs_top_builddir ${CMAKE_CURRENT_BINARY_DIR})

if (HAVE_DOT)
set(DOT ${LLVM_PATH_DOT})
endif()
Expand All @@ -21,20 +21,20 @@ if (LLVM_ENABLE_DOXYGEN)
set(enable_external_search "NO")
set(extra_search_mappings "")
endif()

# If asked, configure doxygen for the creation of a Qt Compressed Help file.
option(LLVM_ENABLE_DOXYGEN_QT_HELP
"Generate a Qt Compressed Help file." OFF)
if (LLVM_ENABLE_DOXYGEN_QT_HELP)
set(LLVM_DOXYGEN_QCH_FILENAME "org.llvm.qch" CACHE STRING
"Filename of the Qt Compressed help file")
set(LLVM_DOXYGEN_QHP_NAMESPACE "org.llvm" CACHE STRING
set(LLVM_DOXYGEN_QHP_NAMESPACE "org.llvm" CACHE STRING
"Namespace under which the intermediate Qt Help Project file lives")
set(LLVM_DOXYGEN_QHP_CUST_FILTER_NAME "${PACKAGE_STRING}" CACHE STRING
"See http://qt-project.org/doc/qt-4.8/qthelpproject.html#custom-filters")
set(LLVM_DOXYGEN_QHP_CUST_FILTER_ATTRS "${PACKAGE_NAME},${PACKAGE_VERSION}" CACHE STRING
"See http://qt-project.org/doc/qt-4.8/qthelpproject.html#filter-attributes")
find_program(LLVM_DOXYGEN_QHELPGENERATOR_PATH qhelpgenerator
find_program(LLVM_DOXYGEN_QHELPGENERATOR_PATH qhelpgenerator
DOC "Path to the qhelpgenerator binary")
if (NOT LLVM_DOXYGEN_QHELPGENERATOR_PATH)
message(FATAL_ERROR "Failed to find qhelpgenerator binary")
Expand All @@ -55,7 +55,7 @@ if (LLVM_ENABLE_DOXYGEN)
set(llvm_doxygen_qhp_cust_filter_name "")
set(llvm_doxygen_qhp_cust_filter_attrs "")
endif()

option(LLVM_DOXYGEN_SVG
"Use svg instead of png files for doxygen graphs." OFF)
if (LLVM_DOXYGEN_SVG)
Expand Down Expand Up @@ -113,6 +113,7 @@ if (LLVM_ENABLE_SPHINX)
if (${SPHINX_OUTPUT_MAN})
add_sphinx_target(man llvm)
add_sphinx_target(man llvm-dwarfdump)
add_sphinx_target(man dsymutil)
endif()

endif()
Expand Down
5 changes: 5 additions & 0 deletions docs/CommandGuide/FileCheck.rst
Expand Up @@ -86,6 +86,11 @@ OPTIONS

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

.. option:: -D<VAR=VALUE>

Sets a filecheck variable ``VAR`` with value ``VALUE`` that can be used in
``CHECK:`` lines.

.. option:: -version

Show the version number of this program.
Expand Down
89 changes: 89 additions & 0 deletions docs/CommandGuide/dsymutil.rst
@@ -0,0 +1,89 @@
dsymutil - manipulate archived DWARF debug symbol files
=======================================================

SYNOPSIS
--------

| :program:`dsymutil` [*options*] *executable*
DESCRIPTION
-----------

:program:`dsymutil` links the DWARF debug information found in the object files
for an executable *executable* by using debug symbols information contained in
its symbol table. By default, the linked debug information is placed in a
``.dSYM`` bundle with the same name as the executable.

OPTIONS
-------
.. option:: --arch=<arch>

Link DWARF debug information only for specified CPU architecture types.
Architectures may be specified by name. When using this option, an error will
be returned if any architectures can not be properly linked. This option can
be specified multiple times, once for each desired architecture. All CPU
architectures will be linked by default and any architectures that can't be
properly linked will cause :program:`dsymutil` to return an error.

.. option:: --dump-debug-map

Dump the *executable*'s debug-map (the list of the object files containing the
debug information) in YAML format and exit. Not DWARF link will take place.

.. option:: -f, --flat

Produce a flat dSYM file. A ``.dwarf`` extension will be appended to the
executable name unless the output file is specified using the -o option.

.. option:: --no-odr

Do not use ODR (One Definition Rule) for uniquing C++ types.

.. option:: --no-output

Do the link in memory, but do not emit the result file.

.. option:: --no-swiftmodule-timestamp

Don't check the timestamp for swiftmodule files.

.. option:: -j <n>, --num-threads=<n>

Specifies the maximum number (``n``) of simultaneous threads to use when
linking multiple architectures.

.. option:: -o <filename>

Specifies an alternate ``path`` to place the dSYM bundle. The default dSYM
bundle path is created by appending ``.dSYM`` to the executable name.

.. option:: --oso-prepend-path=<path>

Specifies a ``path`` to prepend to all debug symbol object file paths.

.. option:: -s, --symtab

Dumps the symbol table found in *executable* or object file(s) and exits.

.. option:: -v, --verbose

Display verbose information when linking.

.. option:: --version

Display the version of the tool.

.. option:: -y

Treat *executable* as a YAML debug-map rather than an executable.

EXIT STATUS
-----------

:program:`dsymutil` returns 0 if the DWARF debug information was linked
successfully. Otherwise, it returns 1.

SEE ALSO
--------

:manpage:`llvm-dwarfdump(1)`
1 change: 1 addition & 0 deletions docs/CommandGuide/index.rst
Expand Up @@ -30,6 +30,7 @@ Basic Commands
llvm-stress
llvm-symbolizer
llvm-dwarfdump
dsymutil

Debugging Tools
~~~~~~~~~~~~~~~
Expand Down
12 changes: 6 additions & 6 deletions docs/CommandGuide/lli.rst
Expand Up @@ -122,7 +122,7 @@ CODE GENERATION OPTIONS

Choose the code model from:

.. code-block:: perl
.. code-block:: text
default: Target default code model
small: Small code model
Expand Down Expand Up @@ -154,7 +154,7 @@ CODE GENERATION OPTIONS

Instruction schedulers available (before register allocation):

.. code-block:: perl
.. code-block:: text
=default: Best scheduler for the target
=none: No scheduling: breadth first sequencing
Expand All @@ -168,7 +168,7 @@ CODE GENERATION OPTIONS

Register allocator to use (default=linearscan)

.. code-block:: perl
.. code-block:: text
=bigblock: Big-block register allocator
=linearscan: linear scan register allocator =local - local register allocator
Expand All @@ -178,7 +178,7 @@ CODE GENERATION OPTIONS

Choose relocation model from:

.. code-block:: perl
.. code-block:: text
=default: Target default relocation model
=static: Non-relocatable code =pic - Fully relocatable, position independent code
Expand All @@ -188,7 +188,7 @@ CODE GENERATION OPTIONS

Spiller to use (default=local)

.. code-block:: perl
.. code-block:: text
=simple: simple spiller
=local: local spiller
Expand All @@ -197,7 +197,7 @@ CODE GENERATION OPTIONS

Choose style of code to emit from X86 backend:

.. code-block:: perl
.. code-block:: text
=att: Emit AT&T-style assembly
=intel: Emit Intel-style assembly
Expand Down

0 comments on commit d5c2cca

Please sign in to comment.