Add support for Mac OS X 64bit builds with GYP

Note that in order to build for 64bits mode, you'll have
to specify the target architecture explicitely, the default
is still 32bits for Mac OS X.

Example with make and gcc:

$ export GYP_GENERATORS=make
$ make dependencies
$ make -j 8 library=shared x64.release

Example with make and clang:

$ export GYP_GENERATORS=make
$ export CC=/usr/bin/clang
$ export CXX=/usr/bin/clang++
$ export GYP_DEFINES="clang=1"
$ make dependencies
$ make -j 8 library=shared x64.release

Example with xcode:

$ export GYP_GENERATORS=xcode
$ build/gyp_v8 -Dtarget_arch=x64
$ xcodebuild -project build/all.xcodeproj -configuration Release

Contributed by Filipe David Manana <fdmanana@gmail.com>

BUG=
TEST=

Review URL: https://chromiumcodereview.appspot.com/9808065

git-svn-id: http://v8.googlecode.com/svn/branches/bleeding_edge@11199 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
parent 63f03357
......@@ -23,6 +23,7 @@ Daniel James <dnljms@gmail.com>
Dineel D Sule <dsule@codeaurora.org>
Erich Ocean <erich.ocean@me.com>
Fedor Indutny <fedor@indutny.com>
Filipe David Manana <fdmanana@gmail.com>
Ioseb Dzmanashvili <ioseb.dzmanashvili@gmail.com>
Jan de Mooij <jandemooij@gmail.com>
Jay Freeman <saurik@saurik.com>
......
......@@ -266,4 +266,4 @@ $(ENVFILE).new:
# Dependencies.
dependencies:
svn checkout --force http://gyp.googlecode.com/svn/trunk build/gyp \
--revision 1026
--revision 1282
......@@ -238,6 +238,19 @@
],
}],
],
}, { # Section for OS=="mac".
'conditions': [
['target_arch=="ia32"', {
'xcode_settings': {
'ARCHS': ['i386'],
}
}],
['target_arch=="x64"', {
'xcode_settings': {
'ARCHS': ['x86_64'],
}
}],
],
}],
['v8_use_liveobjectlist=="true"', {
'defines': [
......
#!/usr/bin/python
#
# Copyright 2010 the V8 project authors. All rights reserved.
# Copyright 2012 the V8 project authors. All rights reserved.
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are
# met:
......@@ -156,7 +156,12 @@ if __name__ == '__main__':
# Generate for the architectures supported on the given platform.
gyp_args = list(args)
gyp_args.append('-Dtarget_arch=ia32')
target_arch = None
for p in gyp_args:
if p.find('-Dtarget_arch=') == 0:
target_arch = p
if target_arch is None:
gyp_args.append('-Dtarget_arch=ia32')
if utils.GuessOS() == 'linux':
gyp_args.append('-S-ia32')
run_gyp(gyp_args)
......
......@@ -59,6 +59,11 @@
'../../src/v8dll-main.cc',
],
'conditions': [
['OS=="mac"', {
'xcode_settings': {
'OTHER_LDFLAGS': ['-dynamiclib', '-all_load']
},
}],
['OS=="win"', {
'defines': [
'BUILDING_V8_SHARED',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment