On Thu, 31 Dec 2020 at 09:00, Jakob Gruber <jgru...@chromium.org> wrote:

> Hi Ben,
>
> sorry for the late reply, I was (and still am) out of office.
>
> On Mon, Dec 7, 2020 at 3:24 PM Ben Hutchings <ben.hutchi...@essensium.com>
> wrote:
>
[...]

> Questions:
>>
>>    1. Is it expected that snapshots should generally work in
>>    cross-builds?
>>
>> Yes, with restrictions. For example, host- and target bitness must match,
> both must be 32- or 64-bit. I haven't thought much about byte order in this
> context, but it seems possible. Have you tried building the x86 mksnapshot
> as big-endian?
>

I think my cross-builds were running mksnapshot with a big-endian target
specified, but I would have to check that to be certain. But currently most
object fields are copied directly to/from snapshots with no concern for
byte order, so I don't think that had much effect.


> Mksnapshot doesn't run any JS code and thus doesn't use the JS heap; all
> it needs to do is create and serialize it properly. That seems like a good
> first path to explore.
>
> There are some older, slightly related docs here: Windows
> cross-compilation
> <https://docs.google.com/document/d/1gUEKxe73GG7sXNmhdRwKfFFrt0LUBqkllP87wfF42M0/edit#>,
> cross-compilation and mksnapshot
> <https://docs.google.com/document/d/1A8p_OXE8fXE-IvL_qnpz7dYfs__VuUkVpivtLQFjY-Q/edit>
> .
>

Thanks, this explains some things I was confused about.

>
>>    1. If they are expected to work, will it be acceptable to make a lot
>>    of changes to (de)serialisation to make them work with differing byte 
>> order?
>>
>> Yes, changes to support cross-byte-order builds would be acceptable in
> general. I am hoping that their scope would remain small though.
>
[...]

I'm afraid they're currently quite extensive, as I needed to extend object
body descriptor classes to support iteration over all object fields (not
just slots).

Ben.

-- 
-- 
v8-dev mailing list
v8-dev@googlegroups.com
http://groups.google.com/group/v8-dev
--- 
You received this message because you are subscribed to the Google Groups 
"v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to v8-dev+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/v8-dev/CAEwaF0WL3cxnd%3DX5Bj1%3DqhorvPEO%2Bn9rK9_x%2Bn%3D5UqTmw5T-Vg%40mail.gmail.com.

Reply via email to