Thanks for the reply Jakob.
The following patch, also at
https://gist.github.com/2160061, allows
me to build it for Mac OS X in 64bits mode using GYP. Would be great
if others confirm it works for them as well.
Let me know if there's anything else I need to do.
From d5a233f86a9268d68c57b2a2f1ee0fd379bcf9d6 Mon Sep 17 00:00:00 2001
From: Filipe David Borba Manana <
fdma...@apache.org>
Date: Thu, 22 Mar 2012 18:55:35 +0000
Subject: [PATCH] Add support for Mac OS X 64bit builds with GYP
Example:
$ export GYP_GENERATORS=make
$ make dependencies
$ make -j 8 library=shared x64.release
---
Makefile | 2 +-
build/common.gypi | 34 ++++++++++++++++++++++++++++++++++
tools/gyp/v8.gyp | 10 ++++++++--
3 files changed, 43 insertions(+), 3 deletions(-)
diff --git a/Makefile b/Makefile
index 5dc6ca5..e4e36d8 100644
--- a/Makefile
+++ b/Makefile
@@ -260,4 +260,4 @@ $(ENVFILE).new:
# Dependencies.
dependencies:
svn checkout --force
http://gyp.googlecode.com/svn/trunk build/gyp \
- --revision 1026
+ --revision 1251
diff --git a/build/common.gypi b/build/common.gypi
index 5c0c323..deed625 100644
--- a/build/common.gypi
+++ b/build/common.gypi
@@ -317,6 +317,22 @@
'cflags': [ '-Wall', '<(werror)', '-W', '-Wno-unused-
parameter',
'-Wnon-virtual-dtor', '-Woverloaded-
virtual' ],
}],
+ ['OS=="mac" and target_arch=="ia32"', {
+ 'xcode_settings': {
+ 'ARCHS': ['i386'],
+ 'OTHER_CFLAGS': ['-m32'],
+ 'OTHER_CXXFLAGS': ['-m32'],
+ 'OTHER_LDFLAGS': ['-m32']
+ },
+ }],
+ ['OS=="mac" and target_arch=="x64"', {
+ 'xcode_settings': {
+ 'ARCHS': ['x86_64'],
+ 'OTHER_CFLAGS': ['-m64'],
+ 'OTHER_CXXFLAGS': ['-m64'],
+ 'OTHER_LDFLAGS': ['-m64']
+ },
+ }],
],
}, # Debug
'Release': {
@@ -358,6 +374,24 @@
# is specified explicitly.
'GCC_STRICT_ALIASING': 'YES',
},
+ 'conditions': [
+ ['target_arch=="ia32"', {
+ 'xcode_settings': {
+ 'ARCHS': ['i386'],
+ 'OTHER_CFLAGS': ['-m32'],
+ 'OTHER_CXXFLAGS': ['-m32'],
+ 'OTHER_LDFLAGS': ['-m32']
+ },
+ }],
+ ['target_arch=="x64"', {
+ 'xcode_settings': {
+ 'ARCHS': ['x86_64'],
+ 'OTHER_CFLAGS': ['-m64'],
+ 'OTHER_CXXFLAGS': ['-m64'],
+ 'OTHER_LDFLAGS': ['-m64']
+ },
+ }],
+ ],
}], # OS=="mac"
['OS=="win"', {
'msvs_configuration_attributes': {
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp
index 764789a..2913cdf 100644
--- a/tools/gyp/v8.gyp
+++ b/tools/gyp/v8.gyp
@@ -59,6 +59,9 @@
'../../src/v8dll-main.cc',
],
'conditions': [
+ ['OS=="mac"', {
+ 'xcode_settings': {'OTHER_LDFLAGS': ['-dynamiclib',
'-all_load']},
+ }],
['OS=="win"', {
'defines': [
'BUILDING_V8_SHARED',
@@ -536,7 +539,7 @@
'../../src/arm/stub-cache-arm.cc',
],
}],
- ['v8_target_arch=="ia32" or v8_target_arch=="mac" or
OS=="mac"', {
+ ['v8_target_arch=="ia32"', {
'sources': [
'../../src/ia32/assembler-ia32-inl.h',
'../../src/ia32/assembler-ia32.cc',
@@ -601,7 +604,7 @@
'../../src/mips/stub-cache-mips.cc',
],
}],
- ['v8_target_arch=="x64" or v8_target_arch=="mac" or
OS=="mac"', {
+ ['v8_target_arch=="x64"', {
'sources': [
'../../src/x64/assembler-x64-inl.h',
'../../src/x64/assembler-x64.cc',
@@ -982,6 +985,9 @@
}, {
'toolsets': ['target'],
}],
+ ['OS=="mac" and component=="shared_library"', {
+ 'xcode_settings': {'OTHER_LDFLAGS': ['-dynamiclib', '-
all_load']},
+ }],
],
'link_settings': {
'libraries': [
--
1.7.9.1
On Mar 19, 7:38 pm, Jakob Kummerow <
jkumme...@chromium.org> wrote:
> To quotehttp://
code.google.com/p/v8/wiki/BuildingWithGYP:
>
> "Notes:
>
> - trying to build x64 targets on Mac currently fails."