Closed
Bug 1238203
Opened 9 years ago
Closed 7 years ago
build mozglue static when JS_STANDALONE
Categories
(Core :: mozglue, defect)
Core
mozglue
Tracking
()
RESOLVED
DUPLICATE
of bug 1176787
People
(Reporter: vlad, Assigned: mwu)
References
(Blocks 1 open bug)
Details
Attachments
(1 file, 2 obsolete files)
(deleted),
patch
|
Details | Diff | Splinter Review |
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.
Comment 2•9 years ago
|
||
(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.
Reporter | ||
Comment 3•9 years ago
|
||
(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.
Assignee | ||
Comment 4•9 years ago
|
||
(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.
Comment 5•9 years ago
|
||
(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...
Assignee | ||
Comment 6•9 years ago
|
||
Assignee: vladimir → mwu
Attachment #8705909 -
Attachment is obsolete: true
Assignee | ||
Comment 7•9 years ago
|
||
(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.
Assignee | ||
Comment 8•9 years ago
|
||
AWFY uses JS_STANDALONE, but we can probably force jemalloc by modifying https://github.com/h4writer/arewefastyet/blob/master/slave/build.py#L128
Assignee | ||
Comment 9•9 years ago
|
||
Attachment #8718125 -
Attachment is obsolete: true
Updated•9 years ago
|
Blocks: sm-embedding
Comment 10•7 years ago
|
||
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.
Description
•