diff options
author | Ben Murdoch <benm@google.com> | 2011-12-02 17:19:32 +0000 |
---|---|---|
committer | Ben Murdoch <benm@google.com> | 2011-12-02 17:27:49 +0000 |
commit | 3fb3ca8c7ca439d408449a395897395c0faae8d1 (patch) | |
tree | 5cb33db083ae7ebe431e2a460fb3806c54531f9c /build | |
parent | 257744e915dfc84d6d07a6b2accf8402d9ffc708 (diff) | |
download | android_external_v8-3fb3ca8c7ca439d408449a395897395c0faae8d1.tar.gz android_external_v8-3fb3ca8c7ca439d408449a395897395c0faae8d1.tar.bz2 android_external_v8-3fb3ca8c7ca439d408449a395897395c0faae8d1.zip |
Upgrade to V8 3.4
Merge 3.4.14.35
Simple merge required updates to makefiles only.
Bug: 568872
Change-Id: I403a38452c547e06fcfa951c12eca12a1bc40978
Diffstat (limited to 'build')
-rw-r--r-- | build/README.txt | 45 | ||||
-rw-r--r-- | build/all.gyp | 12 | ||||
-rw-r--r-- | build/armu.gypi | 6 | ||||
-rw-r--r-- | build/common.gypi | 41 | ||||
-rwxr-xr-x | build/gyp_v8 | 32 | ||||
-rw-r--r-- | build/v8-features.gypi | 125 |
6 files changed, 240 insertions, 21 deletions
diff --git a/build/README.txt b/build/README.txt index f6b92558..c74b5205 100644 --- a/build/README.txt +++ b/build/README.txt @@ -9,23 +9,40 @@ the V8 project do the following: $ svn co http://gyp.googlecode.com/svn/trunk build/gyp -To generate Makefiles and build 32-bit version on Linux: --------------------------------------------------------- +Note for the command lines below that Debug is the default configuration, +so specifying that on the command lines is not required. -$ GYP_DEFINES=target_arch=ia32 build/gyp_v8 -$ make -To generate Makefiles and build 64-bit version on Linux: --------------------------------------------------------- +To generate Makefiles on Linux: +------------------------------- -$ GYP_DEFINES=target_arch=x64 build/gyp_v8 -$ make +$ build/gyp_v8 -To generate Makefiles and build for the arm simulator on Linux: ---------------------------------------------------------------- +This will build makefiles for ia32, x64 and the ARM simulator with names +Makefile-ia32, Makefile-x64 and Makefile-armu respectively. + +To build and run for ia32 in debug and release version do: + +$ make -f Makefile-ia32 +$ out/Debug/shell +$ make -f Makefile-ia32 BUILDTYPE=Release +$ out/Release/shell + +Change the makefile to build and run for the other architectures. + + +To generate Xcode project files on Mac OS: +------------------------------------------ + +$ build/gyp_v8 + +This will make an Xcode project for the ia32 architecture. To build and run do: + +$ xcodebuild -project build/all.xcodeproj +$ samples/build/Debug/shell +$ xcodebuild -project build/all.xcodeproj -configuration Release +$ samples/build/Release/shell -$ build/gyp_v8 -I build/arm.gypi -$ make To generate Visual Studio solution and project files on Windows: ---------------------------------------------------------------- @@ -42,8 +59,8 @@ repository. From the root of the V8 project do the following: > svn co http://src.chromium.org/svn/trunk/tools/third_party/python_26@70627 third_party/python_26 -Now generate Visual Studio solution and project files: +Now generate Visual Studio solution and project files for the ia32 architecture: -> third_party\python_26\python build/gyp_v8 -D target_arch=ia32 +> third_party\python_26\python build/gyp_v8 Now open build\All.sln in Visual Studio. diff --git a/build/all.gyp b/build/all.gyp index 544e2c29..38287e36 100644 --- a/build/all.gyp +++ b/build/all.gyp @@ -9,9 +9,15 @@ 'type': 'none', 'dependencies': [ '../samples/samples.gyp:*', - '../test/cctest/cctest.gyp:*', - '../src/d8.gyp:*', - ] + '../src/d8.gyp:d8', + ], + 'conditions': [ + [ 'component!="shared_library"', { + 'dependencies': [ + '../test/cctest/cctest.gyp:*', + ], + }] + ], } ] } diff --git a/build/armu.gypi b/build/armu.gypi index 72eb4d15..3f874c00 100644 --- a/build/armu.gypi +++ b/build/armu.gypi @@ -1,4 +1,4 @@ -# Copyright 2010 the V8 project authors. All rights reserved. +# Copyright 2011 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: @@ -27,6 +27,10 @@ { 'variables': { + 'target_arch': 'ia32', 'v8_target_arch': 'arm', + 'armv7': 1, + 'arm_neon': 0, + 'arm_fpu': 'vfpv3', } } diff --git a/build/common.gypi b/build/common.gypi index 19b4dc2c..70204958 100644 --- a/build/common.gypi +++ b/build/common.gypi @@ -139,6 +139,45 @@ }, }, }, - }] + }], # OS=="win" + ['OS=="mac"', { + 'target_defaults': { + 'xcode_settings': { + 'ALWAYS_SEARCH_USER_PATHS': 'NO', + 'GCC_C_LANGUAGE_STANDARD': 'ansi', # -ansi + 'GCC_CW_ASM_SYNTAX': 'NO', # No -fasm-blocks + 'GCC_DYNAMIC_NO_PIC': 'NO', # No -mdynamic-no-pic + # (Equivalent to -fPIC) + 'GCC_ENABLE_CPP_EXCEPTIONS': 'NO', # -fno-exceptions + 'GCC_ENABLE_CPP_RTTI': 'NO', # -fno-rtti + 'GCC_ENABLE_PASCAL_STRINGS': 'NO', # No -mpascal-strings + # GCC_INLINES_ARE_PRIVATE_EXTERN maps to -fvisibility-inlines-hidden + 'GCC_INLINES_ARE_PRIVATE_EXTERN': 'YES', + 'GCC_SYMBOLS_PRIVATE_EXTERN': 'YES', # -fvisibility=hidden + 'GCC_THREADSAFE_STATICS': 'NO', # -fno-threadsafe-statics + 'GCC_TREAT_WARNINGS_AS_ERRORS': 'YES', # -Werror + 'GCC_VERSION': '4.2', + 'GCC_WARN_ABOUT_MISSING_NEWLINE': 'YES', # -Wnewline-eof + 'MACOSX_DEPLOYMENT_TARGET': '10.4', # -mmacosx-version-min=10.4 + 'PREBINDING': 'NO', # No -Wl,-prebind + 'USE_HEADERMAP': 'NO', + 'OTHER_CFLAGS': [ + '-fno-strict-aliasing', + ], + 'WARNING_CFLAGS': [ + '-Wall', + '-Wendif-labels', + '-W', + '-Wno-unused-parameter', + '-Wnon-virtual-dtor', + ], + }, + 'target_conditions': [ + ['_type!="static_library"', { + 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, + }], + ], # target_conditions + }, # target_defaults + }], # OS=="mac" ], } diff --git a/build/gyp_v8 b/build/gyp_v8 index 0c2221e2..61b54c24 100755 --- a/build/gyp_v8 +++ b/build/gyp_v8 @@ -38,9 +38,13 @@ import sys script_dir = os.path.dirname(__file__) v8_root = os.path.normpath(os.path.join(script_dir, os.pardir)) +sys.path.insert(0, os.path.join(v8_root, 'tools')) +import utils + sys.path.insert(0, os.path.join(v8_root, 'build', 'gyp', 'pylib')) import gyp + def apply_gyp_environment(file_path=None): """ Reads in a *.gyp_env file and applies the valid keys to os.environ. @@ -68,6 +72,7 @@ def apply_gyp_environment(file_path=None): else: os.environ[var] = val + def additional_include_files(args=[]): """ Returns a list of additional (.gypi) files to include, without @@ -97,6 +102,14 @@ def additional_include_files(args=[]): return result + +def run_gyp(args): + rc = gyp.main(args) + if rc != 0: + print 'Error running GYP' + sys.exit(rc) + + if __name__ == '__main__': args = sys.argv[1:] @@ -141,5 +154,20 @@ if __name__ == '__main__': print 'Updating projects from gyp files...' sys.stdout.flush() - # Off we go... - sys.exit(gyp.main(args)) + # Generate for the architectures supported on the given platform. + gyp_args = list(args) + gyp_args.append('-Dtarget_arch=ia32') + if utils.GuessOS() == 'linux': + gyp_args.append('-S-ia32') + run_gyp(gyp_args) + + if utils.GuessOS() == 'linux': + gyp_args = list(args) + gyp_args.append('-Dtarget_arch=x64') + gyp_args.append('-S-x64') + run_gyp(gyp_args) + + gyp_args = list(args) + gyp_args.append('-I' + v8_root + '/build/armu.gypi') + gyp_args.append('-S-armu') + run_gyp(gyp_args) diff --git a/build/v8-features.gypi b/build/v8-features.gypi new file mode 100644 index 00000000..40374523 --- /dev/null +++ b/build/v8-features.gypi @@ -0,0 +1,125 @@ +# Copyright 2011 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: +# +# * Redistributions of source code must retain the above copyright +# notice, this list of conditions and the following disclaimer. +# * Redistributions in binary form must reproduce the above +# copyright notice, this list of conditions and the following +# disclaimer in the documentation and/or other materials provided +# with the distribution. +# * Neither the name of Google Inc. nor the names of its +# contributors may be used to endorse or promote products derived +# from this software without specific prior written permission. +# +# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS +# "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT +# LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR +# A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT +# OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +# SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +# LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, +# DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY +# THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT +# (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE +# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + +# TODO(sgjesse): This is currently copied from v8.gyp, should probably +# be refactored. +{ + 'variables': { + 'use_system_v8%': 0, + 'msvs_use_common_release': 0, + 'gcc_version%': 'unknown', + 'v8_compress_startup_data%': 'off', + 'v8_target_arch%': '<(target_arch)', + + # Setting 'v8_can_use_unaligned_accesses' to 'true' will allow the code + # generated by V8 to do unaligned memory access, and setting it to 'false' + # will ensure that the generated code will always do aligned memory + # accesses. The default value of 'default' will try to determine the correct + # setting. Note that for Intel architectures (ia32 and x64) unaligned memory + # access is allowed for all CPUs. + 'v8_can_use_unaligned_accesses%': 'default', + + # Setting 'v8_can_use_vfp_instructions' to 'true' will enable use of ARM VFP + # instructions in the V8 generated code. VFP instructions will be enabled + # both for the snapshot and for the ARM target. Leaving the default value + # of 'false' will avoid VFP instructions in the snapshot and use CPU feature + # probing when running on the target. + 'v8_can_use_vfp_instructions%': 'false', + + # Setting v8_use_arm_eabi_hardfloat to true will turn on V8 support for ARM + # EABI calling convention where double arguments are passed in VFP + # 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_use_snapshot%': 'true', + 'host_os%': '<(OS)', + 'v8_use_liveobjectlist%': 'false', + }, + 'target_defaults': { + 'conditions': [ + ['OS!="mac"', { + 'conditions': [ + ['v8_target_arch=="arm"', { + 'defines': [ + 'V8_TARGET_ARCH_ARM', + ], + 'conditions': [ + [ 'v8_can_use_unaligned_accesses=="true"', { + 'defines': [ + 'CAN_USE_UNALIGNED_ACCESSES=1', + ], + }], + [ 'v8_can_use_unaligned_accesses=="false"', { + 'defines': [ + 'CAN_USE_UNALIGNED_ACCESSES=0', + ], + }], + [ 'v8_can_use_vfp_instructions=="true"', { + 'defines': [ + 'CAN_USE_VFP_INSTRUCTIONS', + ], + }], + [ 'v8_use_arm_eabi_hardfloat=="true"', { + 'defines': [ + 'USE_EABI_HARDFLOAT=1', + 'CAN_USE_VFP_INSTRUCTIONS', + ], + }], + ], + }], + ['v8_target_arch=="ia32"', { + 'defines': [ + 'V8_TARGET_ARCH_IA32', + ], + }], + ['v8_target_arch=="mips"', { + 'defines': [ + 'V8_TARGET_ARCH_MIPS', + ], + }], + ['v8_target_arch=="x64"', { + 'defines': [ + 'V8_TARGET_ARCH_X64', + ], + }], + ], + }], + ], + 'configurations': { + 'Debug': { + 'defines': [ + 'DEBUG', + '_DEBUG', + 'ENABLE_DISASSEMBLER', + 'V8_ENABLE_CHECKS', + 'OBJECT_PRINT', + ], + } + } + } +} |