Index: tools/gyp/v8.gyp |
diff --git a/tools/gyp/v8.gyp b/tools/gyp/v8.gyp |
index 8ea18a6704fd93a3599d82536105e5ca217077ec..3f96f2c0e34a88d4d526cd05c393210113389ff0 100644 |
--- a/tools/gyp/v8.gyp |
+++ b/tools/gyp/v8.gyp |
@@ -53,6 +53,12 @@ |
# registers. Note that the GCC flag '-mfloat-abi=hard' should be used as |
# well when compiling for the ARM target. |
'v8_use_arm_eabi_hardfloat%': 'false', |
+ |
+ 'v8_enable_debugger_support%': 1, |
+ |
+ # Chrome needs this definition unconditionally. For standalone V8 builds, |
+ # it's handled in common.gypi. |
+ 'want_separate_host_toolset%': 1, |
'v8_use_snapshot%': 'true', |
'host_os%': '<(OS)', |
@@ -61,10 +67,11 @@ |
'conditions': [ |
['use_system_v8==0', { |
'target_defaults': { |
- 'defines': [ |
- 'ENABLE_DEBUGGER_SUPPORT', |
- ], |
'conditions': [ |
+ ['v8_enable_debugger_support==1', { |
+ 'defines': ['ENABLE_DEBUGGER_SUPPORT',], |
+ }, |
+ ], |
['OS!="mac"', { |
# TODO(mark): The OS!="mac" conditional is temporary. It can be |
# removed once the Mac Chromium build stops setting target_arch to |
@@ -97,6 +104,19 @@ |
'USE_EABI_HARDFLOAT=1', |
'CAN_USE_VFP_INSTRUCTIONS', |
], |
+ 'cflags': [ |
+ '-mfloat-abi=hard', |
+ ], |
+ }, { |
+ 'defines': [ |
+ 'USE_EABI_HARDFLOAT=0', |
+ ], |
+ }], |
+ # The ARM assembler assumes the host is 32 bits, |
+ # so force building 32-bit host tools. |
+ [ 'host_arch=="x64"', { |
+ 'cflags': ['-m32'], |
+ 'ldflags': ['-m32'], |
}], |
], |
}], |
@@ -155,6 +175,10 @@ |
['OS=="freebsd" or OS=="openbsd"', { |
'cflags': [ '-I/usr/local/include' ], |
}], |
+ ['OS=="linux" or OS=="freebsd" or OS=="openbsd"', { |
+ 'cflags': [ '-Wall', '-Werror', '-W', '-Wno-unused-parameter', |
+ '-Wnon-virtual-dtor' ], |
+ }], |
], |
}, |
'Release': { |
@@ -164,10 +188,6 @@ |
'-O2', |
'-Os', |
], |
- 'cflags': [ |
- '-fomit-frame-pointer', |
- '-O3', |
- ], |
'conditions': [ |
[ 'gcc_version==44', { |
'cflags': [ |
@@ -229,8 +249,12 @@ |
'targets': [ |
{ |
'target_name': 'v8', |
- 'toolsets': ['host', 'target'], |
'conditions': [ |
+ ['want_separate_host_toolset==1', { |
+ 'toolsets': ['host', 'target'], |
+ }, { |
+ 'toolsets': ['target'], |
+ }], |
['v8_use_snapshot=="true"', { |
'dependencies': ['v8_snapshot'], |
}, |
@@ -272,23 +296,23 @@ |
], |
'direct_dependent_settings': { |
'include_dirs': [ |
- '../../include', |
+ '../../include', |
], |
}, |
}, |
{ |
'target_name': 'v8_snapshot', |
'type': '<(library)', |
- 'toolsets': ['host', 'target'], |
'conditions': [ |
+ ['want_separate_host_toolset==1', { |
+ 'toolsets': ['host', 'target'], |
+ 'dependencies': ['mksnapshot#host', 'js2c#host'], |
+ }, { |
+ 'toolsets': ['target'], |
+ 'dependencies': ['mksnapshot', 'js2c'], |
+ }], |
['component=="shared_library"', { |
'conditions': [ |
- # The ARM assembler assumes the host is 32 bits, so force building |
- # 32-bit host tools. |
- ['v8_target_arch=="arm" and host_arch=="x64" and _toolset=="host"', { |
- 'cflags': ['-m32'], |
- 'ldflags': ['-m32'], |
- }], |
['OS=="win"', { |
'defines': [ |
'BUILDING_V8_SHARED', |
@@ -312,8 +336,6 @@ |
}], |
], |
'dependencies': [ |
- 'mksnapshot#host', |
- 'js2c#host', |
'v8_base', |
], |
'include_dirs+': [ |
@@ -380,9 +402,7 @@ |
{ |
'target_name': 'v8_nosnapshot', |
'type': '<(library)', |
- 'toolsets': ['host', 'target'], |
'dependencies': [ |
- 'js2c#host', |
'v8_base', |
], |
'include_dirs+': [ |
@@ -394,11 +414,12 @@ |
'../../src/snapshot-empty.cc', |
], |
'conditions': [ |
- # The ARM assembler assumes the host is 32 bits, so force building |
- # 32-bit host tools. |
- ['v8_target_arch=="arm" and host_arch=="x64" and _toolset=="host"', { |
- 'cflags': ['-m32'], |
- 'ldflags': ['-m32'], |
+ ['want_separate_host_toolset==1', { |
+ 'toolsets': ['host', 'target'], |
+ 'dependencies': ['js2c#host'], |
+ }, { |
+ 'toolsets': ['target'], |
+ 'dependencies': ['js2c'], |
}], |
['component=="shared_library"', { |
'defines': [ |
@@ -411,7 +432,6 @@ |
{ |
'target_name': 'v8_base', |
'type': '<(library)', |
- 'toolsets': ['host', 'target'], |
'include_dirs+': [ |
'../../src', |
], |
@@ -668,10 +688,12 @@ |
'../../src/extensions/gc-extension.h', |
], |
'conditions': [ |
+ ['want_separate_host_toolset==1', { |
+ 'toolsets': ['host', 'target'], |
+ }, { |
+ 'toolsets': ['target'], |
+ }], |
['v8_target_arch=="arm"', { |
- 'include_dirs+': [ |
- '../../src/arm', |
- ], |
'sources': [ |
'../../src/arm/assembler-arm-inl.h', |
'../../src/arm/assembler-arm.cc', |
@@ -704,19 +726,8 @@ |
'../../src/arm/simulator-arm.cc', |
'../../src/arm/stub-cache-arm.cc', |
], |
- 'conditions': [ |
- # The ARM assembler assumes the host is 32 bits, |
- # so force building 32-bit host tools. |
- ['host_arch=="x64" and _toolset=="host"', { |
- 'cflags': ['-m32'], |
- 'ldflags': ['-m32'], |
- }] |
- ] |
}], |
['v8_target_arch=="ia32" or v8_target_arch=="mac" or OS=="mac"', { |
- 'include_dirs+': [ |
- '../../src/ia32', |
- ], |
'sources': [ |
'../../src/ia32/assembler-ia32-inl.h', |
'../../src/ia32/assembler-ia32.cc', |
@@ -748,9 +759,6 @@ |
], |
}], |
['v8_target_arch=="x64" or v8_target_arch=="mac" or OS=="mac"', { |
- 'include_dirs+': [ |
- '../../src/x64', |
- ], |
'sources': [ |
'../../src/x64/assembler-x64-inl.h', |
'../../src/x64/assembler-x64.cc', |
@@ -783,10 +791,6 @@ |
}], |
['OS=="linux"', { |
'link_settings': { |
- 'libraries': [ |
- # Needed for clock_gettime() used by src/platform-linux.cc. |
- '-lrt', |
- ], |
'conditions': [ |
['v8_compress_startup_data=="bz2"', { |
'libraries': [ |
@@ -872,7 +876,13 @@ |
{ |
'target_name': 'js2c', |
'type': 'none', |
- 'toolsets': ['host'], |
+ 'conditions': [ |
+ ['want_separate_host_toolset==1', { |
+ 'toolsets': ['host'], |
+ }, { |
+ 'toolsets': ['target'], |
+ }], |
+ ], |
'variables': { |
'library_files': [ |
'../../src/runtime.js', |
@@ -892,8 +902,9 @@ |
'../../src/macros.py', |
], |
'experimental_library_files': [ |
- '../../src/proxy.js', |
'../../src/macros.py', |
+ '../../src/proxy.js', |
+ '../../src/weakmap.js', |
], |
}, |
'actions': [ |
@@ -938,7 +949,6 @@ |
{ |
'target_name': 'mksnapshot', |
'type': 'executable', |
- 'toolsets': ['host'], |
'dependencies': [ |
'v8_nosnapshot', |
], |
@@ -949,11 +959,10 @@ |
'../../src/mksnapshot.cc', |
], |
'conditions': [ |
- # The ARM assembler assumes the host is 32 bits, so force building |
- # 32-bit host tools. |
- ['v8_target_arch=="arm" and host_arch=="x64" and _toolset=="host"', { |
- 'cflags': ['-m32'], |
- 'ldflags': ['-m32'], |
+ ['want_separate_host_toolset==1', { |
+ 'toolsets': ['host'], |
+ }, { |
+ 'toolsets': ['target'], |
}], |
['v8_compress_startup_data=="bz2"', { |
'libraries': [ |
@@ -964,7 +973,6 @@ |
{ |
'target_name': 'v8_shell', |
'type': 'executable', |
- 'toolsets': ['host'], |
'dependencies': [ |
'v8' |
], |
@@ -972,29 +980,57 @@ |
'../../samples/shell.cc', |
], |
'conditions': [ |
+ ['want_separate_host_toolset==1', { |
+ 'toolsets': ['host'], |
+ }, { |
+ 'toolsets': ['target'], |
+ }], |
['OS=="win"', { |
# This could be gotten by not setting chromium_code, if that's OK. |
'defines': ['_CRT_SECURE_NO_WARNINGS'], |
}], |
- # The ARM assembler assumes the host is 32 bits, so force building |
- # 32-bit host tools. |
- ['v8_target_arch=="arm" and host_arch=="x64" and _toolset=="host"', { |
- 'cflags': ['-m32'], |
- 'ldflags': ['-m32'], |
- }], |
['v8_compress_startup_data=="bz2"', { |
'libraries': [ |
'-lbz2', |
]}], |
], |
}, |
+ { |
+ 'target_name': 'preparser_lib', |
+ 'type': '<(library)', |
+ 'include_dirs+': [ |
+ '../../src', |
+ ], |
+ 'sources': [ |
+ '../../src/allocation.cc', |
+ '../../src/bignum.cc', |
+ '../../src/cached-powers.cc', |
+ '../../src/conversions.cc', |
+ '../../src/hashmap.cc', |
+ '../../src/preparse-data.cc', |
+ '../../src/preparser.cc', |
+ '../../src/preparser-api.cc', |
+ '../../src/scanner-base.cc', |
+ '../../src/strtod.cc', |
+ '../../src/token.cc', |
+ '../../src/unicode.cc', |
+ '../../src/utils.cc', |
+ ], |
+ }, |
], |
}, { # use_system_v8 != 0 |
'targets': [ |
{ |
'target_name': 'v8', |
'type': 'settings', |
- 'toolsets': ['host', 'target'], |
+ 'conditions': [ |
+ ['want_separate_host_toolset==1', { |
+ 'toolsets': ['host', 'target'], |
+ }, { |
+ 'toolsets': ['target'], |
+ }], |
+ |
+ ], |
'link_settings': { |
'libraries': [ |
'-lv8', |
@@ -1004,7 +1040,13 @@ |
{ |
'target_name': 'v8_shell', |
'type': 'none', |
- 'toolsets': ['host'], |
+ 'conditions': [ |
+ ['want_separate_host_toolset==1', { |
+ 'toolsets': ['host'], |
+ }, { |
+ 'toolsets': ['target'], |
+ }], |
+ ], |
'dependencies': [ |
'v8' |
], |