Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update SpiderMonkey to ESR128.0 #474

Merged
merged 31 commits into from
Jul 28, 2024
Merged

Update SpiderMonkey to ESR128.0 #474

merged 31 commits into from
Jul 28, 2024

Conversation

sagudev
Copy link
Member

@sagudev sagudev commented Jul 10, 2024

Thankfully we were more prepared now: #462

It compiles! Streams patch was successfully ported.

Biggest changes:

Companion PR in servo: servo/servo#32769

@sagudev sagudev force-pushed the esr128 branch 3 times, most recently from 52be452 to b02a885 Compare July 10, 2024 16:43
@sagudev
Copy link
Member Author

sagudev commented Jul 10, 2024

Another problem: https://bugzilla.mozilla.org/show_bug.cgi?id=1887728, we need macos sdk 14.4, but this requires Xcode 15.4, that is not available on macos 13 (so we got no x86 runners). I think it would be possible to patch it for this ESR cycle.

@sagudev

This comment was marked as resolved.

@sagudev sagudev force-pushed the esr128 branch 6 times, most recently from f4e8ccd to 31f4963 Compare July 12, 2024 04:05
@sagudev
Copy link
Member Author

sagudev commented Jul 12, 2024

@wusyong Any idea why this is happening: https://github.com/servo/mozjs/actions/runs/9902233667/job/27356251099#step:4:826, I manually checked and there is s_truncf.obj in zip?

@wusyong
Copy link
Member

wusyong commented Jul 12, 2024

@wusyong Any idea why this is happening: https://github.com/servo/mozjs/actions/runs/9902233667/job/27356251099#step:4:826, I manually checked and there is s_truncf.obj in zip?

Hmm, it's weird because I checked out to your branch and used that artifact and it seems fine. I'll look into it.

@wusyong
Copy link
Member

wusyong commented Jul 12, 2024

Okay I got the error. It seems the hash isn't correct?

Take current build for example:
note: lld-link: error: D:\a\mozjs\mozjs\target\debug\build\mozjs_sys-b0f045240069a423\out\build/js/src/build\js_static.lib: could not get the buffer for a child of the archive: 'D:/a/mozjs/mozjs/target/x86_64-pc-windows-msvc/debug/build/mozjs_sys-c2a3d4c65cace61a/out/build/modules/fdlibm/src/s_truncf.obj': no such file or directory

The build is mozjs_sys-b0f045240069a423 but the linker somehow search for mozjs_sys-c2a3d4c65cace61a

Edit: And on my side, it also tried to look for this hash c2a3d4c65cace61a somehow.
Edit2: More specifically, it's always D:/a/mozjs/mozjs/target/x86_64-pc-windows-msvc/debug/build/mozjs_sys-c2a3d4c65cace61a/out/build/modules/fdlibm/src/s_truncf.obj'

@wusyong
Copy link
Member

wusyong commented Jul 12, 2024

I guess we should take this chance to finally build static library on msvc without linking any object files.

@sagudev
Copy link
Member Author

sagudev commented Jul 12, 2024

The build is mozjs_sys-b0f045240069a423 but the linker somehow search for mozjs_sys-c2a3d4c65cace61a

something must be causing hash change.

I guess we should take this chance to finally build static library on msvc without linking any object files.

Ideally yes.

@sagudev
Copy link
Member Author

sagudev commented Jul 12, 2024

Doing ar r js/src/build/js_static.lib modules/fdlibm/src/*.obj should be enough I think.

@wusyong
Copy link
Member

wusyong commented Jul 12, 2024

Doing ar r js/src/build/js_static.lib modules/fdlibm/src/*.obj should be enough I think.

I'm wondering if there's a flag that can enable it. Because other platforms' static libraries just need the .a file.

@sagudev
Copy link
Member Author

sagudev commented Jul 12, 2024

Doing ar r js/src/build/js_static.lib modules/fdlibm/src/*.obj should be enough I think.

I'm wondering if there's a flag that can enable it. Because other platforms' static libraries just need the .a file.

I think something is wrong with build sys (in SM), that doesn't make static really static on windows.

@sagudev sagudev force-pushed the esr128 branch 3 times, most recently from d7127e6 to 1a084f0 Compare July 12, 2024 13:15
@sagudev
Copy link
Member Author

sagudev commented Jul 12, 2024

For offthread compilation I plan to make compileToStencil function that will do everything the threads needs to do, then implement CompileToStencilOffThread in mozjs (now with rust/safe api that will still resemble ESR115 API), that will create new thread on each invocation (the thread will run compileToStencil).

So servo will be migrated to this CompileToStencilOffThread for now (in the future we can use compileToStencil to implement thread pooled version of CompileToStencilOffThread in servo).

Not sure if this will be done as part of SM bump effort or as a follow up (depending on the amount of changes needed).

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
@sagudev sagudev force-pushed the esr128 branch 3 times, most recently from 1cbdabe to 15db7f6 Compare July 26, 2024 12:34
sagudev and others added 10 commits July 27, 2024 12:47
the content needs to be aligned of 8

Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
…ly add lib files in artifact

Co-authored-by: Wu Yu Wei <yuweiwu@pm.me>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
based on: https://hg.mozilla.org/mozilla-central/rev/4cb083a1f85e11336ec37f496b57f181be524c7e
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
Signed-off-by: sagudev <16504129+sagudev@users.noreply.github.com>
@sagudev sagudev marked this pull request as ready for review July 27, 2024 14:13
@sagudev sagudev requested a review from jdm July 27, 2024 14:13
@sagudev
Copy link
Member Author

sagudev commented Jul 27, 2024

I will land this myself, after companion PR get's reviewed.

Copy link
Member

@jdm jdm left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fantastic work figuring out all these new API changes and build issues!

@sagudev sagudev added this pull request to the merge queue Jul 28, 2024
Merged via the queue into servo:main with commit bf41ed0 Jul 28, 2024
21 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants