diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-01-31 16:00:27 +0000 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-01-31 16:00:27 +0000 |
commit | 1db00cc6e94b90c08090bb5b8c406622946c4ae5 (patch) | |
tree | c34bf820c2809fb7e08ed5564df2a25cf759516f /dev-lang/rust/files | |
parent | 693cc9b6e847a01c1bb692153021aaf9fb0fab25 (diff) |
gentoo resync 31.01.2019
Diffstat (limited to 'dev-lang/rust/files')
-rw-r--r-- | dev-lang/rust/files/1.32.0-fix-configure-of-bundled-llvm.patch | 32 | ||||
-rw-r--r-- | dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch | 33 |
2 files changed, 33 insertions, 32 deletions
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 deleted file mode 100644 index eaeab87774eb..000000000000 --- a/dev-lang/rust/files/1.32.0-fix-configure-of-bundled-llvm.patch +++ /dev/null @@ -1,32 +0,0 @@ -Revert "[CMake] Unconditionally add .h and .td files to target sources" - -This reverts commit https://github.com/llvm-mirror/llvm/commit/6fb010f388bb2cb2f00fe039123092308ac4865d. - -Bug: https://bugs.gentoo.org/675752#c7 ---- a/src/llvm/cmake/modules/LLVMProcessSources.cmake -+++ b/src/llvm/cmake/modules/LLVMProcessSources.cmake -@@ -52,15 +52,16 @@ function(llvm_process_sources OUT_VAR) - cmake_parse_arguments(ARG "" "" "ADDITIONAL_HEADERS;ADDITIONAL_HEADER_DIRS" ${ARGN}) - set(sources ${ARG_UNPARSED_ARGUMENTS}) - llvm_check_source_file_list( ${sources} ) -- -- # This adds .td and .h files to the Visual Studio solution: -- add_td_sources(sources) -- find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}") -- if (hdrs) -- set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON) -+ if( LLVM_ENABLE_IDE ) -+ # This adds .td and .h files to the Visual Studio solution: -+ add_td_sources(sources) -+ find_all_header_files(hdrs "${ARG_ADDITIONAL_HEADER_DIRS}") -+ if (hdrs) -+ set_source_files_properties(${hdrs} PROPERTIES HEADER_FILE_ONLY ON) -+ endif() -+ set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON) -+ list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs}) - endif() -- set_source_files_properties(${ARG_ADDITIONAL_HEADERS} PROPERTIES HEADER_FILE_ONLY ON) -- list(APPEND sources ${ARG_ADDITIONAL_HEADERS} ${hdrs}) - - set( ${OUT_VAR} ${sources} PARENT_SCOPE ) - endfunction(llvm_process_sources) diff --git a/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch b/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch new file mode 100644 index 000000000000..afc2cabde4b5 --- /dev/null +++ b/dev-lang/rust/files/1.32.0-system-llvm-7-SIGSEGV.patch @@ -0,0 +1,33 @@ +From 1c95f5a34c14f08d65cdd198827e3a2fcb63cf39 Mon Sep 17 00:00:00 2001 +From: Tom Tromey <tom@tromey.com> +Date: Tue, 22 Jan 2019 11:13:53 -0700 +Subject: [PATCH] Fix issue 57762 + +Issue 57762 points out a compiler crash when the compiler was built +using a stock LLVM 7. LLVM 7 was released without a necessary fix for +a bug in the DWARF discriminant code. + +This patch changes rustc to use the fallback mode on (non-Rust) LLVM 7. + +Closes #57762 +--- + src/librustc_codegen_llvm/debuginfo/metadata.rs | 6 +++++- + 1 file changed, 5 insertions(+), 1 deletion(-) + +diff --git a/src/librustc_codegen_llvm/debuginfo/metadata.rs b/src/librustc_codegen_llvm/debuginfo/metadata.rs +index 6deedd0b5ea3..a354eef6887a 100644 +--- a/src/librustc_codegen_llvm/debuginfo/metadata.rs ++++ b/src/librustc_codegen_llvm/debuginfo/metadata.rs +@@ -1164,7 +1164,11 @@ fn use_enum_fallback(cx: &CodegenCx) -> bool { + // On MSVC we have to use the fallback mode, because LLVM doesn't + // lower variant parts to PDB. + return cx.sess().target.target.options.is_like_msvc +- || llvm_util::get_major_version() < 7; ++ || llvm_util::get_major_version() < 7 ++ // LLVM version 7 did not release with an important bug fix; ++ // but the required patch is in the equivalent Rust LLVM. ++ // See https://github.com/rust-lang/rust/issues/57762. ++ || (llvm_util::get_major_version() == 7 && unsafe { !llvm::LLVMRustIsRustLLVM() }); + } + + // Describes the members of an enum value: An enum is described as a union of |