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

Commit 0242697

Browse files
author
Dylan McKay
committed
Merge branch 'master' into avr-support
2 parents bd648d0 + db4e01f commit 0242697

File tree

297 files changed

+8046
-3555
lines changed

Some content is hidden

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

297 files changed

+8046
-3555
lines changed

.arcconfig

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
{
2-
"project_id" : "llvm",
32
"conduit_uri" : "https://reviews.llvm.org/"
43
}

CMakeLists.txt

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@ if (POLICY CMP0051)
1515
cmake_policy(SET CMP0051 OLD)
1616
endif()
1717

18+
if(POLICY CMP0057)
19+
cmake_policy(SET CMP0057 NEW)
20+
endif()
21+
1822
if(NOT DEFINED LLVM_VERSION_MAJOR)
1923
set(LLVM_VERSION_MAJOR 4)
2024
endif()
@@ -457,6 +461,11 @@ option (LLVM_ENABLE_DOXYGEN "Use doxygen to generate llvm API documentation." OF
457461
option (LLVM_ENABLE_SPHINX "Use Sphinx to generate llvm documentation." OFF)
458462
option (LLVM_ENABLE_OCAMLDOC "Build OCaml bindings documentation." ON)
459463

464+
set(LLVM_INSTALL_DOXYGEN_HTML_DIR "share/doc/llvm/doxygen-html"
465+
CACHE STRING "Doxygen-generated HTML documentation install directory")
466+
set(LLVM_INSTALL_OCAMLDOC_HTML_DIR "share/doc/llvm/ocaml-html"
467+
CACHE STRING "OCamldoc-generated HTML documentation install directory")
468+
460469
option (LLVM_BUILD_EXTERNAL_COMPILER_RT
461470
"Build compiler-rt as an external project." OFF)
462471

@@ -515,6 +524,8 @@ list(REMOVE_DUPLICATES LLVM_TARGETS_TO_BUILD)
515524
set(LLVM_DEFAULT_TARGET_TRIPLE "${LLVM_HOST_TRIPLE}" CACHE STRING
516525
"Default target for which LLVM will generate code." )
517526
set(TARGET_TRIPLE "${LLVM_DEFAULT_TARGET_TRIPLE}")
527+
message(STATUS "LLVM host triple: ${LLVM_HOST_TRIPLE}")
528+
message(STATUS "LLVM default target triple: ${LLVM_DEFAULT_TARGET_TRIPLE}")
518529

519530
include(HandleLLVMOptions)
520531

cmake/modules/AddLLVM.cmake

Lines changed: 6 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -776,8 +776,7 @@ macro(add_llvm_tool name)
776776
endif()
777777
add_llvm_executable(${name} ${ARGN})
778778

779-
list(FIND LLVM_TOOLCHAIN_TOOLS ${name} LLVM_IS_${name}_TOOLCHAIN_TOOL)
780-
if (LLVM_IS_${name}_TOOLCHAIN_TOOL GREATER -1 OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
779+
if ( ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
781780
if( LLVM_BUILD_TOOLS )
782781
install(TARGETS ${name}
783782
EXPORT LLVMExports
@@ -1264,20 +1263,13 @@ function(add_llvm_tool_symlink name dest)
12641263
add_custom_target(${target_name} ALL DEPENDS ${output_path})
12651264
set_target_properties(${target_name} PROPERTIES FOLDER Tools)
12661265

1267-
# Make sure the parent tool is a toolchain tool, otherwise exclude this tool
1268-
list(FIND LLVM_TOOLCHAIN_TOOLS ${dest} LLVM_IS_${dest}_TOOLCHAIN_TOOL)
1269-
if (NOT LLVM_IS_${dest}_TOOLCHAIN_TOOL GREATER -1)
1270-
set(LLVM_IS_${name}_TOOLCHAIN_TOOL ${LLVM_IS_${dest}_TOOLCHAIN_TOOL})
1271-
else()
1272-
list(FIND LLVM_TOOLCHAIN_TOOLS ${name} LLVM_IS_${name}_TOOLCHAIN_TOOL)
1266+
# Make sure both the link and target are toolchain tools
1267+
if (NOT ${name} IN_LIST LLVM_TOOLCHAIN_TOOLS OR NOT ${dest} IN_LIST LLVM_TOOLCHAIN_TOOLS)
1268+
return()
12731269
endif()
12741270

1275-
# LLVM_IS_${name}_TOOLCHAIN_TOOL will only be greater than -1 if both this
1276-
# tool and its parent tool are in LLVM_TOOLCHAIN_TOOLS
1277-
if (LLVM_IS_${name}_TOOLCHAIN_TOOL GREATER -1 OR NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
1278-
if( LLVM_BUILD_TOOLS )
1279-
llvm_install_symlink(${name} ${dest})
1280-
endif()
1271+
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY AND LLVM_BUILD_TOOLS )
1272+
llvm_install_symlink(${name} ${dest})
12811273
endif()
12821274
endif()
12831275
endfunction()

cmake/modules/GetHostTriple.cmake

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,5 +26,4 @@ function( get_host_triple var )
2626
set( value ${TT_OUT} )
2727
endif( MSVC )
2828
set( ${var} ${value} PARENT_SCOPE )
29-
message(STATUS "Target triple: ${value}")
3029
endfunction( get_host_triple var )

docs/CMake.rst

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -431,6 +431,11 @@ LLVM-specific variables
431431
Uses .svg files instead of .png files for graphs in the Doxygen output.
432432
Defaults to OFF.
433433

434+
**LLVM_INSTALL_DOXYGEN_HTML_DIR**:STRING
435+
The path to install Doxygen-generated HTML documentation to. This path can
436+
either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
437+
`share/doc/llvm/doxygen-html`.
438+
434439
**LLVM_ENABLE_SPHINX**:BOOL
435440
If specified, CMake will search for the ``sphinx-build`` executable and will make
436441
the ``SPHINX_OUTPUT_HTML`` and ``SPHINX_OUTPUT_MAN`` CMake options available.
@@ -461,6 +466,11 @@ LLVM-specific variables
461466
either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
462467
`share/doc/llvm/html`.
463468

469+
**LLVM_INSTALL_OCAMLDOC_HTML_DIR**:STRING
470+
The path to install OCamldoc-generated HTML documentation to. This path can
471+
either be absolute or relative to the CMAKE_INSTALL_PREFIX. Defaults to
472+
`share/doc/llvm/ocaml-html`.
473+
464474
**LLVM_CREATE_XCODE_TOOLCHAIN**:BOOL
465475
OS X Only: If enabled CMake will generate a target named
466476
'install-xcode-toolchain'. This target will create a directory at

docs/CMakeLists.txt

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -93,8 +93,11 @@ if (LLVM_ENABLE_DOXYGEN)
9393
endif()
9494

9595
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
96-
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html
97-
DESTINATION docs/html)
96+
# ./ suffix is needed to copy the contents of html directory without
97+
# appending html/ into LLVM_INSTALL_DOXYGEN_HTML_DIR.
98+
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/doxygen/html/.
99+
COMPONENT doxygen-html
100+
DESTINATION "${LLVM_INSTALL_DOXYGEN_HTML_DIR}")
98101
endif()
99102
endif()
100103
endif()
@@ -154,7 +157,10 @@ if( NOT uses_ocaml LESS 0 AND LLVM_ENABLE_OCAMLDOC )
154157
add_dependencies(ocaml_doc ${doc_targets})
155158

156159
if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY)
157-
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html
158-
DESTINATION docs/ocaml/html)
160+
# ./ suffix is needed to copy the contents of html directory without
161+
# appending html/ into LLVM_INSTALL_OCAMLDOC_HTML_DIR.
162+
install(DIRECTORY ${CMAKE_CURRENT_BINARY_DIR}/ocamldoc/html/.
163+
COMPONENT ocamldoc-html
164+
DESTINATION "${LLVM_INSTALL_OCAMLDOC_HTML_DIR}")
159165
endif()
160166
endif()

docs/CodingStandards.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1169,7 +1169,7 @@ Here are some examples of good and bad names:
11691169
// kind of factories.
11701170
};
11711171

1172-
Vehicle MakeVehicle(VehicleType Type) {
1172+
Vehicle makeVehicle(VehicleType Type) {
11731173
VehicleMaker M; // Might be OK if having a short life-span.
11741174
Tire Tmp1 = M.makeTire(); // Bad -- 'Tmp1' provides no information.
11751175
Light Headlight = M.makeLight("head"); // Good -- descriptive.

0 commit comments

Comments
 (0)