From: pgowda <pgowda.cve@gmail.com>
To: openembedded-core@lists.openembedded.org
Cc: richard.purdie@linuxfoundation.org, rwmacleod@gmail.com,
alex.kanavin@gmail.com, umesh.kalappa0@gmail.com,
pgowda <pgowda.cve@gmail.com>
Subject: [PATCH] Build libstd-rs in release mode to compile mozjs
Date: Sun, 5 Dec 2021 21:45:04 -0800 [thread overview]
Message-ID: <20211206054504.61115-1-pgowda.cve@gmail.com> (raw)
When mozjs in firefox is built with DEBUG_BUILD = "1"
in local.conf, it will fail with the following error:
rustc-1.56.0-src/vendor/compiler_builtins/src/int/specialized_div_rem
/asymmetric.rs:57:
more undefined references to `core::panicking::panic' follow
Switch to building libstd-rs in "release" mode as that works
around the issue and builds mozjs successfully. This is a
work-around that can be used until the root cause of the debug
build error is resolved.
Signed-off-by: pgowda <pgowda.cve@gmail.com>
---
meta/recipes-devtools/rust/libstd-rs.inc | 3 +++
1 file changed, 3 insertions(+)
diff --git a/meta/recipes-devtools/rust/libstd-rs.inc b/meta/recipes-devtools/rust/libstd-rs.inc
index 987956344a..96eaa2bdc0 100644
--- a/meta/recipes-devtools/rust/libstd-rs.inc
+++ b/meta/recipes-devtools/rust/libstd-rs.inc
@@ -19,9 +19,12 @@ RUSTFLAGS += "-L ${STAGING_LIBDIR} -C link-arg=-Wl,-soname,libstd.so"
S = "${RUSTSRC}/src/libstd"
+CARGO_BUILD_FLAGS:append = "${@' --release' if d.getVar('DEBUG_BUILD') == '1' else ''}"
+
CARGO_FEATURES ?= "panic-unwind backtrace"
CARGO_BUILD_FLAGS += "--features '${CARGO_FEATURES}'"
CARGO_VENDORING_DIRECTORY = "${RUSTSRC}/vendor"
+BUILD_DIR = "release"
do_compile:prepend () {
export CARGO_TARGET_DIR="${B}"
--
2.31.1
next reply other threads:[~2021-12-06 5:45 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-12-06 5:45 pgowda [this message]
2021-12-06 8:20 ` [PATCH] Build libstd-rs in release mode to compile mozjs Alexander Kanavin
2021-12-08 1:51 ` [OE-core] " Randy MacLeod
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20211206054504.61115-1-pgowda.cve@gmail.com \
--to=pgowda.cve@gmail.com \
--cc=alex.kanavin@gmail.com \
--cc=openembedded-core@lists.openembedded.org \
--cc=richard.purdie@linuxfoundation.org \
--cc=rwmacleod@gmail.com \
--cc=umesh.kalappa0@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox