-
Notifications
You must be signed in to change notification settings - Fork 6.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[llvm] update to 11.1.0, add features and fix issues (#16232)
* fix issue #16215 * add more projects and fix issue #16222 * add version * exclude libc from default projects * remove libc, add fland to default projects * update to v11.1.0 * fix compiler-rt install path * fix SHA for version 11.1.0 * fix libc++ install * re-fix libc++ install * fix pstl install * fix flang's license file name * install tools in tools/llvm, fix file names * revert bin directory for libraries * don't create clang sub-directory in llvm/tools * overwrite version * copy tool dependencies * overwrite version * remove vcpkg_copy_tools call * overwrite version * restore default features * overwrite version * overwrite version * convert manifest to json * install usage files * overwrite version * remove feature `default-projects` * modernize CMake in usage files * overwrite version * update ordering * override version
- Loading branch information
Showing
14 changed files
with
698 additions
and
189 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
clang/lib/Headers/CMakeLists.txt | 2 +- | ||
clang/runtime/CMakeLists.txt | 2 +- | ||
compiler-rt/cmake/base-config-ix.cmake | 2 +- | ||
3 files changed, 3 insertions(+), 3 deletions(-) | ||
|
||
diff --git a/clang/lib/Headers/CMakeLists.txt b/clang/lib/Headers/CMakeLists.txt | ||
index 0692fe75a441..65f72c2da7da 100644 | ||
--- a/clang/lib/Headers/CMakeLists.txt | ||
+++ b/clang/lib/Headers/CMakeLists.txt | ||
@@ -208,7 +208,7 @@ set_target_properties(clang-resource-headers PROPERTIES | ||
FOLDER "Misc" | ||
RUNTIME_OUTPUT_DIRECTORY "${output_dir}") | ||
|
||
-set(header_install_dir lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}/include) | ||
+set(header_install_dir tools/llvm/lib/clang/${CLANG_VERSION}/include) | ||
|
||
install( | ||
FILES ${files} ${generated_files} | ||
diff --git a/clang/runtime/CMakeLists.txt b/clang/runtime/CMakeLists.txt | ||
index 61bbbf8faedd..f6d0b73d9913 100644 | ||
--- a/clang/runtime/CMakeLists.txt | ||
+++ b/clang/runtime/CMakeLists.txt | ||
@@ -82,7 +82,7 @@ if(LLVM_BUILD_EXTERNAL_COMPILER_RT AND EXISTS ${COMPILER_RT_SRC_ROOT}/) | ||
-DLLVM_LIT_ARGS=${LLVM_LIT_ARGS} | ||
-DCOMPILER_RT_OUTPUT_DIR=${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION} | ||
-DCOMPILER_RT_EXEC_OUTPUT_DIR=${LLVM_RUNTIME_OUTPUT_INTDIR} | ||
- -DCOMPILER_RT_INSTALL_PATH:STRING=lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION} | ||
+ -DCOMPILER_RT_INSTALL_PATH:STRING=tools/llvm/lib/clang/${CLANG_VERSION} | ||
-DCOMPILER_RT_INCLUDE_TESTS=${LLVM_INCLUDE_TESTS} | ||
-DCMAKE_INSTALL_PREFIX=${CMAKE_INSTALL_PREFIX} | ||
-DLLVM_LIBDIR_SUFFIX=${LLVM_LIBDIR_SUFFIX} | ||
diff --git a/compiler-rt/cmake/base-config-ix.cmake b/compiler-rt/cmake/base-config-ix.cmake | ||
index 964dd598f102..7379a1ba06d1 100644 | ||
--- a/compiler-rt/cmake/base-config-ix.cmake | ||
+++ b/compiler-rt/cmake/base-config-ix.cmake | ||
@@ -43,7 +43,7 @@ if (LLVM_TREE_AVAILABLE) | ||
# Setup the paths where compiler-rt runtimes and headers should be stored. | ||
set(COMPILER_RT_OUTPUT_DIR ${LLVM_LIBRARY_OUTPUT_INTDIR}/clang/${CLANG_VERSION}) | ||
set(COMPILER_RT_EXEC_OUTPUT_DIR ${LLVM_RUNTIME_OUTPUT_INTDIR}) | ||
- set(COMPILER_RT_INSTALL_PATH lib${LLVM_LIBDIR_SUFFIX}/clang/${CLANG_VERSION}) | ||
+ set(COMPILER_RT_INSTALL_PATH tools/llvm/lib/clang/${CLANG_VERSION}) | ||
option(COMPILER_RT_INCLUDE_TESTS "Generate and build compiler-rt unit tests." | ||
${LLVM_INCLUDE_TESTS}) | ||
option(COMPILER_RT_ENABLE_WERROR "Fail and stop if warning is triggered" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
libcxx/src/CMakeLists.txt | 4 +--- | ||
1 file changed, 1 insertion(+), 3 deletions(-) | ||
|
||
diff --git a/libcxx/src/CMakeLists.txt b/libcxx/src/CMakeLists.txt | ||
index 2001c09761d9..e17de934534f 100644 | ||
--- a/libcxx/src/CMakeLists.txt | ||
+++ b/libcxx/src/CMakeLists.txt | ||
@@ -364,9 +364,7 @@ if (LIBCXX_INSTALL_LIBRARY) | ||
# NOTE: This install command must go after the cxx install command otherwise | ||
# it will not be executed after the library symlinks are installed. | ||
if (LIBCXX_ENABLE_SHARED AND LIBCXX_ENABLE_ABI_LINKER_SCRIPT) | ||
- # Replace the libc++ filename with $<TARGET_LINKER_FILE:cxx> | ||
- # after we required CMake 3.0. | ||
- install(FILES "${LIBCXX_LIBRARY_DIR}/libc++${CMAKE_SHARED_LIBRARY_SUFFIX}" | ||
+ install(FILES "$<TARGET_LINKER_FILE:cxx_shared>" | ||
DESTINATION ${LIBCXX_INSTALL_PREFIX}${LIBCXX_INSTALL_LIBRARY_DIR} | ||
COMPONENT libcxx) | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,172 @@ | ||
clang-tools-extra/modularize/CMakeLists.txt | 2 +- | ||
clang/cmake/modules/AddClang.cmake | 2 +- | ||
clang/tools/c-index-test/CMakeLists.txt | 2 +- | ||
clang/tools/clang-format/CMakeLists.txt | 2 +- | ||
clang/tools/scan-build/CMakeLists.txt | 2 +- | ||
clang/tools/scan-view/CMakeLists.txt | 2 +- | ||
clang/utils/hmaptool/CMakeLists.txt | 2 +- | ||
flang/cmake/modules/AddFlang.cmake | 2 +- | ||
flang/tools/f18/CMakeLists.txt | 4 ++-- | ||
lld/cmake/modules/AddLLD.cmake | 2 +- | ||
lld/tools/lld/CMakeLists.txt | 2 +- | ||
lldb/cmake/modules/AddLLDB.cmake | 2 +- | ||
12 files changed, 13 insertions(+), 13 deletions(-) | ||
|
||
diff --git a/clang-tools-extra/modularize/CMakeLists.txt b/clang-tools-extra/modularize/CMakeLists.txt | ||
index 4caae81c49b6..8c459c51cc34 100644 | ||
--- a/clang-tools-extra/modularize/CMakeLists.txt | ||
+++ b/clang-tools-extra/modularize/CMakeLists.txt | ||
@@ -23,5 +23,5 @@ clang_target_link_libraries(modularize | ||
) | ||
|
||
install(TARGETS modularize | ||
- RUNTIME DESTINATION bin | ||
+ RUNTIME DESTINATION tools/llvm | ||
COMPONENT clang-extras) | ||
diff --git a/clang/cmake/modules/AddClang.cmake b/clang/cmake/modules/AddClang.cmake | ||
index 704278a0e93b..e8a87f574474 100644 | ||
--- a/clang/cmake/modules/AddClang.cmake | ||
+++ b/clang/cmake/modules/AddClang.cmake | ||
@@ -170,7 +170,7 @@ macro(add_clang_tool name) | ||
|
||
install(TARGETS ${name} | ||
${export_to_clangtargets} | ||
- RUNTIME DESTINATION bin | ||
+ RUNTIME DESTINATION tools/llvm | ||
COMPONENT ${name}) | ||
|
||
if(NOT LLVM_ENABLE_IDE) | ||
diff --git a/clang/tools/c-index-test/CMakeLists.txt b/clang/tools/c-index-test/CMakeLists.txt | ||
index ceef4b08637c..ce6d7799475b 100644 | ||
--- a/clang/tools/c-index-test/CMakeLists.txt | ||
+++ b/clang/tools/c-index-test/CMakeLists.txt | ||
@@ -54,7 +54,7 @@ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) | ||
set_property(TARGET c-index-test APPEND PROPERTY INSTALL_RPATH | ||
"@executable_path/../../lib") | ||
else() | ||
- set(INSTALL_DESTINATION bin) | ||
+ set(INSTALL_DESTINATION tools/llvm) | ||
endif() | ||
|
||
install(TARGETS c-index-test | ||
diff --git a/clang/tools/clang-format/CMakeLists.txt b/clang/tools/clang-format/CMakeLists.txt | ||
index 35ecdb11253c..d1b800dfdadc 100644 | ||
--- a/clang/tools/clang-format/CMakeLists.txt | ||
+++ b/clang/tools/clang-format/CMakeLists.txt | ||
@@ -36,5 +36,5 @@ install(PROGRAMS clang-format.py | ||
DESTINATION share/clang | ||
COMPONENT clang-format) | ||
install(PROGRAMS git-clang-format | ||
- DESTINATION bin | ||
+ DESTINATION tools/llvm | ||
COMPONENT clang-format) | ||
diff --git a/clang/tools/scan-build/CMakeLists.txt b/clang/tools/scan-build/CMakeLists.txt | ||
index ec0702d76f18..9a34a09921b1 100644 | ||
--- a/clang/tools/scan-build/CMakeLists.txt | ||
+++ b/clang/tools/scan-build/CMakeLists.txt | ||
@@ -47,7 +47,7 @@ if(CLANG_INSTALL_SCANBUILD) | ||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) | ||
list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) | ||
install(PROGRAMS bin/${BinFile} | ||
- DESTINATION bin | ||
+ DESTINATION tools/llvm | ||
COMPONENT scan-build) | ||
endforeach() | ||
|
||
diff --git a/clang/tools/scan-view/CMakeLists.txt b/clang/tools/scan-view/CMakeLists.txt | ||
index 22edb974bac7..60f69d358fb9 100644 | ||
--- a/clang/tools/scan-view/CMakeLists.txt | ||
+++ b/clang/tools/scan-view/CMakeLists.txt | ||
@@ -22,7 +22,7 @@ if(CLANG_INSTALL_SCANVIEW) | ||
DEPENDS ${CMAKE_CURRENT_SOURCE_DIR}/bin/${BinFile}) | ||
list(APPEND Depends ${CMAKE_BINARY_DIR}/bin/${BinFile}) | ||
install(PROGRAMS bin/${BinFile} | ||
- DESTINATION bin | ||
+ DESTINATION tools/llvm | ||
COMPONENT scan-view) | ||
endforeach() | ||
|
||
diff --git a/clang/utils/hmaptool/CMakeLists.txt b/clang/utils/hmaptool/CMakeLists.txt | ||
index 62f2de0cb15c..38dc821c76de 100644 | ||
--- a/clang/utils/hmaptool/CMakeLists.txt | ||
+++ b/clang/utils/hmaptool/CMakeLists.txt | ||
@@ -10,7 +10,7 @@ add_custom_command(OUTPUT ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HM | ||
|
||
list(APPEND Depends ${CMAKE_BINARY_DIR}/${CMAKE_CFG_INTDIR}/bin/${CLANG_HMAPTOOL}) | ||
install(PROGRAMS ${CLANG_HMAPTOOL} | ||
- DESTINATION bin | ||
+ DESTINATION tools/llvm | ||
COMPONENT hmaptool) | ||
|
||
add_custom_target(hmaptool ALL DEPENDS ${Depends}) | ||
diff --git a/flang/cmake/modules/AddFlang.cmake b/flang/cmake/modules/AddFlang.cmake | ||
index 7fe8b7e9f406..b338dddd0850 100644 | ||
--- a/flang/cmake/modules/AddFlang.cmake | ||
+++ b/flang/cmake/modules/AddFlang.cmake | ||
@@ -120,7 +120,7 @@ macro(add_flang_tool name) | ||
|
||
install(TARGETS ${name} | ||
${export_to_flangtargets} | ||
- RUNTIME DESTINATION bin | ||
+ RUNTIME DESTINATION tools/llvm | ||
COMPONENT ${name}) | ||
|
||
if(NOT LLVM_ENABLE_IDE) | ||
diff --git a/flang/tools/f18/CMakeLists.txt b/flang/tools/f18/CMakeLists.txt | ||
index f3af6e8312fe..aa58108b332b 100644 | ||
--- a/flang/tools/f18/CMakeLists.txt | ||
+++ b/flang/tools/f18/CMakeLists.txt | ||
@@ -58,7 +58,7 @@ endforeach() | ||
|
||
add_custom_target(module_files ALL DEPENDS ${MODULE_FILES}) | ||
|
||
-install(TARGETS f18 DESTINATION bin) | ||
+install(TARGETS f18 DESTINATION tools/llvm) | ||
|
||
set(FLANG_INTRINSIC_MODULES_DIR ${FLANG_BINARY_DIR}/include/flang) | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/flang.sh.in ${CMAKE_BINARY_DIR}/tools/flang/bin/flang @ONLY) | ||
@@ -68,4 +68,4 @@ set(FLANG_INTRINSIC_MODULES_DIR ${CMAKE_INSTALL_PREFIX}/include/flang) | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/flang.sh.in ${FLANG_BINARY_DIR}/bin/flang-install.sh @ONLY) | ||
configure_file(${CMAKE_CURRENT_SOURCE_DIR}/f18_version.h.in ${CMAKE_CURRENT_BINARY_DIR}/f18_version.h @ONLY) | ||
|
||
-install(PROGRAMS ${FLANG_BINARY_DIR}/bin/flang-install.sh DESTINATION bin RENAME flang PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE) | ||
+install(PROGRAMS ${FLANG_BINARY_DIR}/bin/flang-install.sh DESTINATION tools/llvm RENAME flang PERMISSIONS OWNER_EXECUTE OWNER_READ OWNER_WRITE) | ||
diff --git a/lld/cmake/modules/AddLLD.cmake b/lld/cmake/modules/AddLLD.cmake | ||
index 23df41312403..86f4eafeed07 100644 | ||
--- a/lld/cmake/modules/AddLLD.cmake | ||
+++ b/lld/cmake/modules/AddLLD.cmake | ||
@@ -54,7 +54,7 @@ macro(add_lld_tool name) | ||
|
||
install(TARGETS ${name} | ||
${export_to_lldtargets} | ||
- RUNTIME DESTINATION bin | ||
+ RUNTIME DESTINATION tools/llvm | ||
COMPONENT ${name}) | ||
|
||
if(NOT CMAKE_CONFIGURATION_TYPES) | ||
diff --git a/lld/tools/lld/CMakeLists.txt b/lld/tools/lld/CMakeLists.txt | ||
index e6f72fcd3488..0e5a2c81e825 100644 | ||
--- a/lld/tools/lld/CMakeLists.txt | ||
+++ b/lld/tools/lld/CMakeLists.txt | ||
@@ -21,7 +21,7 @@ target_link_libraries(lld | ||
) | ||
|
||
install(TARGETS lld | ||
- RUNTIME DESTINATION bin) | ||
+ RUNTIME DESTINATION tools/llvm) | ||
|
||
if(NOT LLD_SYMLINKS_TO_CREATE) | ||
set(LLD_SYMLINKS_TO_CREATE lld-link ld.lld ld64.lld wasm-ld) | ||
diff --git a/lldb/cmake/modules/AddLLDB.cmake b/lldb/cmake/modules/AddLLDB.cmake | ||
index 4ed5c647c5d2..cb31901dddbb 100644 | ||
--- a/lldb/cmake/modules/AddLLDB.cmake | ||
+++ b/lldb/cmake/modules/AddLLDB.cmake | ||
@@ -187,7 +187,7 @@ function(add_lldb_executable name) | ||
endif() | ||
|
||
if(ARG_GENERATE_INSTALL) | ||
- set(install_dest bin) | ||
+ set(install_dest tools/llvm) | ||
if(ARG_INSTALL_PREFIX) | ||
set(install_dest ${ARG_INSTALL_PREFIX}) | ||
endif() |
Oops, something went wrong.