summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorPgowda <pgowda.cve@gmail.com>2021-09-29 06:20:54 -0700
committerRichard Purdie <richard.purdie@linuxfoundation.org>2021-10-14 11:57:38 +0100
commit11df8c79a70621591b88f769157db278121cd657 (patch)
tree7ca2f79063226fa7d5bb135c2e1780796f5c49e2
parent99ab2198e2235d4e705535fab392c8f74ee44d6a (diff)
downloadpoky-11df8c79a70621591b88f769157db278121cd657.tar.gz
Fix rust-native build issue when debug is enabled
When DEBUG_BUILD is set for building rust-native, it generated error as follows:- ========================================================= Building : rustdoc, rustdoc-json-types error[E0463]: can't find crate for `rustc_llvm` which `rustc_driver` depends on --> src/librustdoc/lib.rs:37:1 | 37 | extern crate rustc_driver; | ^^^^^^^^^^^^^^^^^^^^^^^^^^ can't find crate ========================================================= On analyzing the issue, it was found that rustc_llvm crate was present at required path. However, it was very huge due to the presence of debugging information. Hence, it was somehow not recognized as a valid crate. The following patch removes the debug information from rust-llvm-native which is built prior to rust-native but retains debug information as required in rust-native binaries. (From OE-Core rev: 7261a4b4d5778a48c8d72c9125233b1b0bc009e6) Signed-off-by: Pgowda <pgowda.cve@gmail.com> Signed-off-by: Alexandre Belloni <alexandre.belloni@bootlin.com> Signed-off-by: Richard Purdie <richard.purdie@linuxfoundation.org>
-rw-r--r--meta/recipes-devtools/rust/rust-llvm.inc5
1 files changed, 5 insertions, 0 deletions
diff --git a/meta/recipes-devtools/rust/rust-llvm.inc b/meta/recipes-devtools/rust/rust-llvm.inc
index d7f445385b..0f8fb785b7 100644
--- a/meta/recipes-devtools/rust/rust-llvm.inc
+++ b/meta/recipes-devtools/rust/rust-llvm.inc
@@ -15,6 +15,11 @@ DEPENDS += "ninja-native rust-llvm-native"
15ARM_INSTRUCTION_SET:armv5 = "arm" 15ARM_INSTRUCTION_SET:armv5 = "arm"
16ARM_INSTRUCTION_SET:armv4t = "arm" 16ARM_INSTRUCTION_SET:armv4t = "arm"
17 17
18# rustc_llvm with debug info is not recognized as a valid crate that's
19# generated by rust-llvm-native.
20CFLAGS:remove = "-g"
21CXXFLAGS:remove = "-g"
22
18LLVM_DIR = "llvm${LLVM_RELEASE}" 23LLVM_DIR = "llvm${LLVM_RELEASE}"
19 24
20EXTRA_OECMAKE = " \ 25EXTRA_OECMAKE = " \