This repository has been archived by the owner on Jan 7, 2023. It is now read-only.
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Change-Id: Ica44e8bd575124cfe742a86210437c93bf5a47b6
- Loading branch information
Showing
5 changed files
with
202 additions
and
18 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
37 changes: 37 additions & 0 deletions
37
releases/7.0.0/patches_external/export-utility-to-targets-build-install_1.patch
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,37 @@ | ||
From 3436463bf7021c9986f3a52ea0b699abfcbd0b95 Mon Sep 17 00:00:00 2001 | ||
From: Stefan Granitz <stefan.graenitz@gmail.com> | ||
Date: Fri, 11 Jan 2019 19:34:34 +0000 | ||
Subject: [PATCH] [CMake] Export utility targets to the build/install tree | ||
depending on LLVM_BUILD/INSTALL_UTILS | ||
|
||
Summary: | ||
Allow external projects to import test-related targets like FileCheck, count, not etc. and query binary paths, properties, etc. | ||
This would be useful for LLDB, because it reduces the difference between in-tree vs. standalone builds and simplifies CMake logic. | ||
|
||
Reviewers: chapuni, gottesmm, beanz | ||
|
||
Reviewed By: beanz | ||
|
||
Subscribers: mgorny, lldb-commits, llvm-commits, #lldb | ||
|
||
Differential Revision: https://reviews.llvm.org/D56606 | ||
|
||
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@350959 91177308-0d34-0410-b5e6-96231b3b80d8 | ||
--- | ||
cmake/modules/AddLLVM.cmake | 3 +++ | ||
1 file changed, 3 insertions(+) | ||
|
||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake | ||
index 9b7d24184fe0..4dbc0ddaf4f0 100644 | ||
--- a/cmake/modules/AddLLVM.cmake | ||
+++ b/cmake/modules/AddLLVM.cmake | ||
@@ -920,6 +920,9 @@ macro(add_llvm_utility name) | ||
DEPENDS ${name} | ||
COMPONENT ${name}) | ||
endif() | ||
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) | ||
+ elseif( LLVM_BUILD_UTILS ) | ||
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name}) | ||
endif() | ||
endmacro(add_llvm_utility name) | ||
|
65 changes: 65 additions & 0 deletions
65
releases/7.0.0/patches_external/export-utility-to-targets-build-install_2.patch
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,65 @@ | ||
From 4ce5f86eddc0bf42a971db4509829036d5b17b92 Mon Sep 17 00:00:00 2001 | ||
From: Stefan Granitz <stefan.graenitz@gmail.com> | ||
Date: Fri, 1 Feb 2019 13:08:09 +0000 | ||
Subject: [PATCH] [CMake] Add install targets for utilities to LLVM exports if | ||
LLVM_INSTALL_UTILS=ON | ||
|
||
Summary: D56606 was only appending target names to the `LLVM_EXPORTS`/`LLVM_EXPORTS_BUILDTREE_ONLY` properties. Targets showed up correctly in the build-tree `LLVMExports.cmake`, but they were missing in the installed one (as we found in https://bugs.llvm.org/show_bug.cgi?id=40443), because install did not register them explicitly. | ||
|
||
Reviewers: mgorny, smeenai, beanz, gottesmm, dschuff, tstellar, serge-sans-paille | ||
|
||
Reviewed By: smeenai | ||
|
||
Subscribers: llvm-commits | ||
|
||
Differential Revision: https://reviews.llvm.org/D57383 | ||
|
||
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352869 91177308-0d34-0410-b5e6-96231b3b80d8 | ||
--- | ||
cmake/modules/AddLLVM.cmake | 32 +++++++++++++++++++++----------- | ||
1 file changed, 21 insertions(+), 11 deletions(-) | ||
|
||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake | ||
index 39781bf34e24..607d6e682b49 100644 | ||
--- a/cmake/modules/AddLLVM.cmake | ||
+++ b/cmake/modules/AddLLVM.cmake | ||
@@ -924,18 +924,28 @@ macro(add_llvm_utility name) | ||
|
||
add_llvm_executable(${name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN}) | ||
set_target_properties(${name} PROPERTIES FOLDER "Utils") | ||
- if( LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS ) | ||
- install (TARGETS ${name} | ||
- RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} | ||
- COMPONENT ${name}) | ||
- if (NOT CMAKE_CONFIGURATION_TYPES) | ||
- add_llvm_install_targets(install-${name} | ||
- DEPENDS ${name} | ||
- COMPONENT ${name}) | ||
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) | ||
+ if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS) | ||
+ if (${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR | ||
+ NOT LLVM_DISTRIBUTION_COMPONENTS) | ||
+ set(export_to_llvmexports EXPORT LLVMExports) | ||
+ set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True) | ||
+ endif() | ||
+ | ||
+ install(TARGETS ${name} | ||
+ ${export_to_llvmexports} | ||
+ RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} | ||
+ COMPONENT ${name}) | ||
+ | ||
+ if (NOT LLVM_ENABLE_IDE) | ||
+ add_llvm_install_targets(install-${name} | ||
+ DEPENDS ${name} | ||
+ COMPONENT ${name}) | ||
+ endif() | ||
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) | ||
+ elseif(LLVM_BUILD_UTILS) | ||
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name}) | ||
endif() | ||
- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) | ||
- elseif( LLVM_BUILD_UTILS ) | ||
- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name}) | ||
endif() | ||
endmacro(add_llvm_utility name) | ||
|
65 changes: 65 additions & 0 deletions
65
releases/8.0.0/patches_external/export-utility-to-targets-build-install.patch
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,65 @@ | ||
From 4ce5f86eddc0bf42a971db4509829036d5b17b92 Mon Sep 17 00:00:00 2001 | ||
From: Stefan Granitz <stefan.graenitz@gmail.com> | ||
Date: Fri, 1 Feb 2019 13:08:09 +0000 | ||
Subject: [PATCH] [CMake] Add install targets for utilities to LLVM exports if | ||
LLVM_INSTALL_UTILS=ON | ||
|
||
Summary: D56606 was only appending target names to the `LLVM_EXPORTS`/`LLVM_EXPORTS_BUILDTREE_ONLY` properties. Targets showed up correctly in the build-tree `LLVMExports.cmake`, but they were missing in the installed one (as we found in https://bugs.llvm.org/show_bug.cgi?id=40443), because install did not register them explicitly. | ||
|
||
Reviewers: mgorny, smeenai, beanz, gottesmm, dschuff, tstellar, serge-sans-paille | ||
|
||
Reviewed By: smeenai | ||
|
||
Subscribers: llvm-commits | ||
|
||
Differential Revision: https://reviews.llvm.org/D57383 | ||
|
||
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@352869 91177308-0d34-0410-b5e6-96231b3b80d8 | ||
--- | ||
cmake/modules/AddLLVM.cmake | 32 +++++++++++++++++++++----------- | ||
1 file changed, 21 insertions(+), 11 deletions(-) | ||
|
||
diff --git a/cmake/modules/AddLLVM.cmake b/cmake/modules/AddLLVM.cmake | ||
index 39781bf34e24..607d6e682b49 100644 | ||
--- a/cmake/modules/AddLLVM.cmake | ||
+++ b/cmake/modules/AddLLVM.cmake | ||
@@ -911,18 +911,28 @@ macro(add_llvm_utility name) | ||
|
||
add_llvm_executable(${name} DISABLE_LLVM_LINK_LLVM_DYLIB ${ARGN}) | ||
set_target_properties(${name} PROPERTIES FOLDER "Utils") | ||
- if( LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS ) | ||
- install (TARGETS ${name} | ||
- RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} | ||
- COMPONENT ${name}) | ||
- if (NOT LLVM_ENABLE_IDE) | ||
- add_llvm_install_targets(install-${name} | ||
- DEPENDS ${name} | ||
- COMPONENT ${name}) | ||
+ if (NOT LLVM_INSTALL_TOOLCHAIN_ONLY) | ||
+ if (LLVM_INSTALL_UTILS AND LLVM_BUILD_UTILS) | ||
+ if (${name} IN_LIST LLVM_DISTRIBUTION_COMPONENTS OR | ||
+ NOT LLVM_DISTRIBUTION_COMPONENTS) | ||
+ set(export_to_llvmexports EXPORT LLVMExports) | ||
+ set_property(GLOBAL PROPERTY LLVM_HAS_EXPORTS True) | ||
+ endif() | ||
+ | ||
+ install(TARGETS ${name} | ||
+ ${export_to_llvmexports} | ||
+ RUNTIME DESTINATION ${LLVM_UTILS_INSTALL_DIR} | ||
+ COMPONENT ${name}) | ||
+ | ||
+ if (NOT LLVM_ENABLE_IDE) | ||
+ add_llvm_install_targets(install-${name} | ||
+ DEPENDS ${name} | ||
+ COMPONENT ${name}) | ||
+ endif() | ||
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) | ||
+ elseif(LLVM_BUILD_UTILS) | ||
+ set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name}) | ||
endif() | ||
- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS ${name}) | ||
- elseif( LLVM_BUILD_UTILS ) | ||
- set_property(GLOBAL APPEND PROPERTY LLVM_EXPORTS_BUILDTREE_ONLY ${name}) | ||
endif() | ||
endmacro(add_llvm_utility name) | ||
|