Building V8 for ARM64 in MSVC2012

90 views
Skip to first unread message

Prince Wall

unread,
Aug 7, 2014, 5:50:31 PM8/7/14
to v8-u...@googlegroups.com
I am able to build d8 easily using the Visual Studio 2012 solution files generated by "python build/gyp_v8 -Dtarget_arch=arm". However, when I generate solutions files with "-Dtarget_arch=arm64", build always fails.
 
As required by the following macros inside [v8]/src/base/build_config.h:
 
#if (V8_TARGET_ARCH_ARM64 && !(V8_HOST_ARCH_X64 || V8_HOST_ARCH_ARM64))
#error Target architecture arm64 is only supported on arm64 and x64 host
#endif
 
I used "New Solution Platform" to x64 inside BUILD/Configuration Manager.
 
However, from [v8]\src\arm64\constants-arm64.h, it says "Assert that this is an LP64 system" and uses type "long" a lot, assuming it is 64-bit. However, Windows x64 is LLP64 system and has "long" as 32-bit.  Does this mean that we cannot use target_arch=arm64 on Windows host?
 
Thanks,
Prince

 

 
 
 

 

Sven Panne

unread,
Aug 8, 2014, 2:21:28 AM8/8/14
to v8-u...@googlegroups.com
On Thu, Aug 7, 2014 at 11:50 PM, Prince Wall <realpri...@gmail.com> wrote:
[...] However, from [v8]\src\arm64\constants-arm64.h, it says "Assert that this is an LP64 system" and uses type "long" a lot, assuming it is 64-bit. However, Windows x64 is LLP64 system and has "long" as 32-bit.  Does this mean that we cannot use target_arch=arm64 on Windows host?

I'm not sure if anybody has tried to build ARM64 stuff on WIndows yet, so it's quite probable that there are bugs in this combination. Patches accepted... ;-)

One more point: Support for VS 2012 is on death row, you'll need VS 2013 soon.

Rodolph Perfetta

unread,
Aug 8, 2014, 6:04:42 AM8/8/14
to v8-u...@googlegroups.com
There is nothing fundamentally preventing an LLP64 system to build/run arm64 but it was never tested hence not supported. Some re-factoring is probably required (don't forget constants). As Sven said, patches welcome.



--
--
v8-users mailing list
v8-u...@googlegroups.com
http://groups.google.com/group/v8-users
---
You received this message because you are subscribed to the Google Groups "v8-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to v8-users+u...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Prince Wall

unread,
Aug 8, 2014, 6:08:31 PM8/8/14
to v8-u...@googlegroups.com
Thank Sven and Rodolph for the suggestions. Indeed, lots of constants ending with "UL" or "L" need to be changed for Windows build which assumes 32-bit for "long".
 
In fact, it would be better to use "ULL" and "LL", which guarantees 64-bit on both LP64 and LLP64 systems. The bitwidth for "long" is the only difference between the two.


You received this message because you are subscribed to a topic in the Google Groups "v8-users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/v8-users/1DZPKQlIW7A/unsubscribe.
To unsubscribe from this group and all its topics, send an email to v8-users+u...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages