servo / rust-mozjs

DEPRECATED - moved to servo/mozjs instead.
Mozilla Public License 2.0
293 stars 117 forks source link

Update SpiderMonkey #494

Closed nox closed 4 years ago

nox commented 4 years ago

The enumerate test seems to fail on x86_64 on Windows.

nox commented 4 years ago

Even better, this does not build on Windows with --features debugmozjs.

nox commented 4 years ago

Error seems to be https://github.com/rust-lang/libc/pull/1433

nox commented 4 years ago

Will write a fix first thing in the morning if you didn't already by then. Thank you for your help, really.

nox commented 4 years ago
[mozjs 0.13.0] running: "clang-cl.exe" "-nologo" "-MD" "-Z7" "-Brepro" "-m64" "-I" "C:\\projects\\rust-mozjs\\target\\x86_64-pc-windows-msvc\\debug\\build\\mozjs_sys-348968a14b8060be\\out\\build\\dist\\include" "-W4" "-MDd" "-Od" "-FIC:\\projects\\rust-mozjs\\target\\x86_64-pc-windows-msvc\\debug\\build\\mozjs_sys-348968a14b8060be\\out\\build\\js\\src\\js-confdefs.h" "-Zi" "-GR-" "-Wno-c++0x-extensions" "-Wno-return-type-c-linkage" "-Wno-invalid-offsetof" "-Wno-unused-parameter" "-DDEBUG=" "-D_DEBUG=" "-DWIN32=" "-FoC:\\projects\\rust-mozjs\\target\\x86_64-pc-windows-msvc\\debug\\build\\mozjs-83b0ce056021e4ff\\out\\src/jsglue.o" "-c" "src/jsglue.cpp"

Now to find where that -MDd is from…

jdm commented 4 years ago

Keep in mind that https://github.com/servo/mozjs/commit/2b97c2dc648c84164a6a12418dce0e9cd3b62038 exists, if that helps or hinders at all.

nox commented 4 years ago

Thanks for the pointer. The solution AFAIK was to set MOZ_NO_DEBUG_RTL in mozjs_sys and remove -MDd here.

nox commented 4 years ago

I suspect some sort of ABI issue on Windows with GetPropertyKeys.

nox commented 4 years ago

I fixed the failing enumerate test, this was indeed an ABI issue with MSVC (and clang-cl it seems).

nox commented 4 years ago

AFAICT, we do not include js-config.h when building MFBT, we use js-confdefs.h, which seems to only include configure variables from the old-configure script, not the fancy Python ones we define ourselves.

nox commented 4 years ago

@bors-servo r=asajeffrey

bors-servo commented 4 years ago

:pushpin: Commit a09ebb1 has been approved by asajeffrey

bors-servo commented 4 years ago

:hourglass: Testing commit a09ebb19ee0f1b7d20716b60b19c590fa28a9e1b with merge 98ebda01cde7589bc4f08f289c4e366a58d570a1...

bors-servo commented 4 years ago

:sunny: Test successful - checks-travis, status-appveyor Approved by: asajeffrey Pushing 98ebda01cde7589bc4f08f289c4e366a58d570a1 to master...