LibJS: Add minimum changes to build on Windows and run js.exe

This commit adds the minimal export macros needed to run js.exe on
windows. A followup commit is planned to move to explicit export
entirely.

A static_assert for the size of a struct is also ifdef'ed out as the
semantics around object layout and inheritance are different on MSVC abi
and the struct IteratorRecord ends up being 40 bytes not 32.
This commit is contained in:
R-Goc 2025-05-24 23:46:13 +02:00 committed by Andrew Kaster
commit 96c197faf1
Notes: github-actions[bot] 2025-05-29 09:27:44 +00:00
6 changed files with 14 additions and 4 deletions

View file

@ -7,11 +7,12 @@
#pragma once
#include <LibJS/Contrib/Test262/262Object.h>
#include <LibJS/Export.h>
#include <LibJS/Runtime/GlobalObject.h>
namespace JS::Test262 {
class GlobalObject final : public JS::GlobalObject {
class JS_API GlobalObject final : public JS::GlobalObject {
JS_OBJECT(GlobalObject, JS::GlobalObject);
GC_DECLARE_ALLOCATOR(GlobalObject);