Closed Bug 1238203 Opened 9 years ago Closed 7 years ago

build mozglue static when JS_STANDALONE

Categories

(Core :: mozglue, defect)

defect
Not set
normal

Tracking

()

RESOLVED DUPLICATE of bug 1176787

People

(Reporter: vlad, Assigned: mwu)

References

(Blocks 1 open bug)

Details

Attachments

(1 file, 2 obsolete files)

When JS_STANDALONE is true, we should build mozglue as static on the 3 platforms it's not (windows, osx, android) to avoid an unnecessary shared lib.
(In reply to Vladimir Vukicevic [:vlad] [:vladv] from bug 1238023 comment #9) > What I want is a single libjs_static.a (js_static.lib), and perhaps a > libmozglue.a (mozglue.lib) that I can statically link in to servo.exe and > get a working JS engine for servo. I don't think servo uses jemalloc, but > these changes shouldn't regress shell builds and the like. Hrm. Rust uses jemalloc, so servo does... and actually building mozjs with its own jemalloc is not a good idea. So the starting point would be to build mozjs with --disable-jemalloc. I'll repeat what I said in the other bug, but building mozglue as static on Windows won't work, for, in fact, more reasons that I was thinking when I commented there. It is, however, fine to build it static when jemalloc is disabled. So --disable-jemalloc needs to be a precondition to building mozglue static.
(In reply to Mike Hommey (VAC: 31 Dec - 11 Jan) [:glandium] from comment #2) > (In reply to Vladimir Vukicevic [:vlad] [:vladv] from bug 1238023 comment #9) > > What I want is a single libjs_static.a (js_static.lib), and perhaps a > > libmozglue.a (mozglue.lib) that I can statically link in to servo.exe and > > get a working JS engine for servo. I don't think servo uses jemalloc, but > > these changes shouldn't regress shell builds and the like. Hrm. > > Rust uses jemalloc, so servo does... and actually building mozjs with its > own jemalloc is not a good idea. That's likely what's been happening here -- rust/servo may use jemalloc, but mozjs is built as a separate standalone lib that links to whatever allocator it gets handed. > So the starting point would be to build > mozjs with --disable-jemalloc. I'll repeat what I said in the other bug, but > building mozglue as static on Windows won't work, for, in fact, more reasons > that I was thinking when I commented there. Hm, okay, but it did/does work.. I have such a build of Servo that seems to run fine. I know that doesn't mean much though, so I'm happy to figure out the right way to get it properly static.
(In reply to Mike Hommey [:glandium] from comment #2) > So the starting point would be to build > mozjs with --disable-jemalloc. This is actually what the build scripts in servo do, which is probably why this works at all. It'll be better to have js/src/configure.in do the right thing by default though.
(In reply to Michael Wu [:mwu] from comment #4) > (In reply to Mike Hommey [:glandium] from comment #2) > > So the starting point would be to build > > mozjs with --disable-jemalloc. > > This is actually what the build scripts in servo do, which is probably why > this works at all. It'll be better to have js/src/configure.in do the right > thing by default though. Define "the right thing". Considering enabling jemalloc by default in standalone js was a conscious choice by js developers...
Attached patch static mozglue when JS_STANDALONE, v2 (obsolete) (deleted) — Splinter Review
Assignee: vladimir → mwu
Attachment #8705909 - Attachment is obsolete: true
(In reply to Mike Hommey [:glandium] from comment #5) > Define "the right thing". Considering enabling jemalloc by default in > standalone js was a conscious choice by js developers... The right thing here is to disable jemalloc when mozglue is static, right? jsshell users probably still want jemalloc enabled, but I rather make things easier for embedders than people benchmarking with jsshell.
AWFY uses JS_STANDALONE, but we can probably force jemalloc by modifying https://github.com/h4writer/arewefastyet/blob/master/slave/build.py#L128
Attachment #8718125 - Attachment is obsolete: true
My understanding is this is fixed by 1176787.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → DUPLICATE
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: