1 |
commit: d50382655a40e343363d82b7c371a06660b9bdf8 |
2 |
Author: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
3 |
AuthorDate: Sat Jan 19 20:14:10 2019 +0000 |
4 |
Commit: Thomas Deutschmann <whissi <AT> gentoo <DOT> org> |
5 |
CommitDate: Sat Jan 19 20:20:52 2019 +0000 |
6 |
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=d5038265 |
7 |
|
8 |
dev-lang/rust: fix configure of bundled LLVM |
9 |
|
10 |
Bug: https://bugs.gentoo.org/675752 |
11 |
Package-Manager: Portage-2.3.56, Repoman-2.3.12 |
12 |
Signed-off-by: Thomas Deutschmann <whissi <AT> gentoo.org> |
13 |
|
14 |
.../1.32.0-fix-configure-of-bundled-llvm.patch | 32 ++++++++++++++++++++++ |
15 |
dev-lang/rust/rust-1.32.0.ebuild | 5 +++- |
16 |
2 files changed, 36 insertions(+), 1 deletion(-) |
17 |
|
18 |
diff --git a/dev-lang/rust/files/1.32.0-fix-configure-of-bundled-llvm.patch b/dev-lang/rust/files/1.32.0-fix-configure-of-bundled-llvm.patch |
19 |
new file mode 100644 |
20 |
index 00000000000..eaeab87774e |
21 |
--- /dev/null |
22 |
+++ b/dev-lang/rust/files/1.32.0-fix-configure-of-bundled-llvm.patch |
23 |
@@ -0,0 +1,32 @@ |
24 |
+Revert "[CMake] Unconditionally add .h and .td files to target sources" |
25 |
+ |
26 |
+This reverts commit https://github.com/llvm-mirror/llvm/commit/6fb010f388bb2cb2f00fe039123092308ac4865d. |
27 |
+ |
28 |
+Bug: https://bugs.gentoo.org/675752#c7 |
29 |
+--- a/src/llvm/cmake/modules/LLVMProcessSources.cmake |
30 |
++++ b/src/llvm/cmake/modules/LLVMProcessSources.cmake |
31 |
+@@ -52,15 +52,16 @@ function(llvm_process_sources OUT_VAR) |
32 |
+ cmake_parse_arguments(ARG "" "" "ADDITIONAL_HEADERS;ADDITIONAL_HEADER_DIRS" ${ARGN}) |
33 |
+ set(sources ${ARG_UNPARSED_ARGUMENTS}) |
34 |
+ llvm_check_source_file_list( ${sources} ) |
35 |
+- |
36 |
+- # This adds .td and .h files to the Visual Studio solution: |
37 |
+- add_td_sources(sources) |
38 |
+- find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}") |
39 |
+- if (hdrs) |
40 |
+- set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON) |
41 |
++ if( LLVM_ENABLE_IDE ) |
42 |
++ # This adds .td and .h files to the Visual Studio solution: |
43 |
++ add_td_sources(sources) |
44 |
++ find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}") |
45 |
++ if (hdrs) |
46 |
++ set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON) |
47 |
++ endif() |
48 |
++ set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON) |
49 |
++ list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs}) |
50 |
+ endif() |
51 |
+- set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON) |
52 |
+- list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs}) |
53 |
+ |
54 |
+ set( ${OUT_VAR} ${sources} PARENT_SCOPE ) |
55 |
+ endfunction(llvm_process_sources) |
56 |
|
57 |
diff --git a/dev-lang/rust/rust-1.32.0.ebuild b/dev-lang/rust/rust-1.32.0.ebuild |
58 |
index 680160fc9a9..d7262e896e2 100644 |
59 |
--- a/dev-lang/rust/rust-1.32.0.ebuild |
60 |
+++ b/dev-lang/rust/rust-1.32.0.ebuild |
61 |
@@ -61,7 +61,10 @@ REQUIRED_USE="|| ( ${ALL_LLVM_TARGETS[*]} ) |
62 |
|
63 |
S="${WORKDIR}/${MY_P}-src" |
64 |
|
65 |
-PATCHES=( "${FILESDIR}"/1.30.1-clippy-sysroot.patch ) |
66 |
+PATCHES=( |
67 |
+ "${FILESDIR}"/1.30.1-clippy-sysroot.patch |
68 |
+ "${FILESDIR}"/1.32.0-fix-configure-of-bundled-llvm.patch |
69 |
+) |
70 |
|
71 |
toml_usex() { |
72 |
usex "$1" true false |