Problems with Mac Compilation

59 views
Skip to first unread message

Artur Ventura

unread,
Sep 27, 2020, 6:55:03 PM9/27/20
to v8-dev
Hi there

I've been trying to compile and run v8 on a mac but I'm having problems. 

I used the basic compilation args.gn generated by `gn args out.gn/x64.release.sample`:

```
is_component_build = false
is_debug = true
target_cpu = "x64"
use_custom_libcxx = false
v8_monolithic = true
v8_use_external_startup_data = false
```

However when I'm calling a native function in JS, FunctionCallbackInfo object has the arguments in reverse. I've been looking into v8.h and it seems that this is happening because V8_REVERSE_JSARGS is not defined. I've changed the code just to force V8_REVERSE_JSARGS to be defined and it works.

I'm pretty sure that either I'm missing an GN option, or less likely, there's a bug on the mac compilation rules. 

Am I missing something?

Artur


Ben Noordhuis

unread,
Sep 28, 2020, 2:36:58 AM9/28/20
to v8-...@googlegroups.com
I assume you observe this when building your own project against V8?
Make sure your project uses the same set of defines as V8.

V8_REVERSE_JSARGS is one example but others that caused some fallout
recently are V8_COMPRESS_POINTERS and V8_31BIT_SMIS_ON_64BIT_ARCH.

Victor Gomes

unread,
Sep 28, 2020, 4:42:07 AM9/28/20
to v8-...@googlegroups.com
Hi Artur,

V8_REVERSE_JSARGS is defined in BUILD.gn (or with the GN flag v8_reverse_js_args) and it is true by default in ToT.
As Ben mentioned, if you are building your own project against V8, you must make sure that the project uses the same set of defines.

Best,

--
--
v8-dev mailing list
v8-...@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+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/v8-dev/CAHQurc8mwENKeJKsC8RCRZui21_QXPurWAVgyycdD7O382xBdw%40mail.gmail.com.


Victor Gomes

Software Engineer

victo...@google.com


Google Germany GmbH

Erika-Mann-Straße 33

80636 München


Geschäftsführer: Paul Manicle, Halimah DeLaine Prado

Registergericht und -nummer: Hamburg, HRB 86891

Sitz der Gesellschaft: Hamburg


Diese E-Mail ist vertraulich. Falls Ssie diese fälschlicherweise erhalten haben sollten, leiten Sie diese bitte nicht an jemand anderes weiter, löschen Sie alle Kopien und Anhänge davon und lassen Sie mich bitte wissen, dass die E-Mail an die falsche Person gesendet wurde. 

     

This e-mail is confidential. If you received this communication by mistake, please don't forward it to anyone else, please erase all copies and attachments, and please let me know that it has gone to the wrong person.


Message has been deleted

Kenton Varda

unread,
Oct 22, 2020, 3:43:43 PM10/22/20
to v8-dev
Is there a preferred way to query the V8 build system to ask what defines it it using, so that dependent projects can be built correctly?

-Kenton

Reply all
Reply to author
Forward
Message has been deleted
0 new messages