Build failure with --disable-optimize and --disable-jit
Categories
(Core :: JavaScript Engine: JIT, defect)
Tracking
()
People
(Reporter: tjc, Assigned: tjc)
Details
Attachments
(1 obsolete file)
User Agent: Mozilla/5.0 (X11; Linux x86_64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/96.0.4664.93 Safari/537.36
Steps to reproduce:
I tried to build bookmarks-central (commit 56d042fb65e64c578add3fdf91198824e52802a7 ) with the following flags in my .mozconfig:
ac_add_options --disable-jit --enable-warnings-as-errors --disable-optimize
Actual results:
I got the following linker error:
'js/src/build/libjs_static.a
js/src/build/libmozjs-97a1.so
ld.lld: error: undefined hidden symbol: js::jit::LIRGeneratorShared::lowerWasmCompareAndSelect(js::jit::MWasmSelect*, js::jit::MDefinition*, js::jit::MDefinition*, js::jit::MCompare::CompareType, JSOp)
referenced by Lowering.cpp:6490 (/home/tjc/gecko-fork/js/src/jit/Lowering.cpp:6490)
/home/tjc/gecko-fork/obj/js/src/build/../jit/Unified_cpp_js_src_jit7.o:(js::jit::LIRGenerator::visitWasmSelect(js::jit::MWasmSelect*))
clang-13: error: linker command failed with exit code 1 (use -v to see invocation)'
I don't see the error unless I have both --disable-jit and --disable-optimize in my .mozconfig.
Expected results:
The build should have succeeded.
If I make the following change to js/src/jit/Lowering.cpp:
`
diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp
index 5ace05dcb545c..e3580684a413f 100644
--- a/js/src/jit/Lowering.cpp
+++ b/js/src/jit/Lowering.cpp
@@ -6469,6 +6469,7 @@ void LIRGenerator::visitIonToWasmCall(MIonToWasmCall* ins) {
assignSafepoint(lir, ins);
}
+#ifndef JS_CODEGEN_NONE
void LIRGenerator::visitWasmSelect(MWasmSelect* ins) {
MDefinition* condExpr = ins->condExpr();
@@ -6499,6 +6500,7 @@ void LIRGenerator::visitWasmSelect(MWasmSelect* ins) {
lowerWasmSelectI(ins);
}
+#endif
`
that fixes the problem. I'll submit a patch, but I don't know if that's the right thing.
| Assignee | ||
Comment 1•4 years ago
|
||
Because visitWasmSelect() depends on the architecture-specific
lowerWasmCompareAndSelect() method, it was causing a compilation failure when
the flags --disable-jit and --disable-optimize were both supplied.
Ifdef this out if JS_CODEGEN_NONE is defined (JIT is disabled).
Updated•4 years ago
|
| Assignee | ||
Comment 2•4 years ago
|
||
I filed Bug 1747766 to add a CI target with this combination of flags, so this bug can just track fixing the specific build failure.
Updated•4 years ago
|
Updated•4 years ago
|
Description
•