Reviewers: Christian Plesner Hansen, Description: Adding support for building V8 for ARM with snapshot using the crosstool compiler. The build has to be broken in to several steps since the snapshot has to be generated on an ARM processor.
Please review this at http://codereview.chromium.org/19014 SVN Base: http://v8.googlecode.com/svn/branches/bleeding_edge/ Affected files: M src/SConscript A tools/arm_build_mksnapshot.sh A tools/arm_from_snapshot.sh Index: tools/arm_from_snapshot.sh =================================================================== --- tools/arm_from_snapshot.sh (revision 0) +++ tools/arm_from_snapshot.sh (revision 0) @@ -0,0 +1,13 @@ +#! /bin/sh + +# Builds a snapshot version of V8 for ARM. The snapshot.cc file needs to be +# produced on ARM and copied to the build directory before running this script. + +export TOOL_PREFIX=/opt/crosstool/gcc-3.3.6-glibc-2.3.2/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu +export CXX=$TOOL_PREFIX-g++ +export AR=$TOOL_PREFIX-ar +export RANLIB=$TOOL_PREFIX-ranlib +export CC=$TOOL_PREFIX-gcc +export USE_SNAPSHOT_CC=on + +scons -Y .. wordsize=32 arch=arm $* Property changes on: tools/arm_from_snapshot.sh ___________________________________________________________________ Added: svn:executable + * Index: tools/arm_build_mksnapshot.sh =================================================================== --- tools/arm_build_mksnapshot.sh (revision 0) +++ tools/arm_build_mksnapshot.sh (revision 0) @@ -0,0 +1,12 @@ +#! /bin/sh + +# builds the mksnapshot executable for ARM using the crosstool compiler. + +export TOOL_PREFIX=/opt/crosstool/gcc-3.3.6-glibc-2.3.2/arm-unknown-linux-gnu/bin/arm-unknown-linux-gnu +export CXX=$TOOL_PREFIX-g++ +export AR=$TOOL_PREFIX-ar +export RANLIB=$TOOL_PREFIX-ranlib +export CC=$TOOL_PREFIX-gcc +export CROSSTOOL=on + +scons -Y .. wordsize=32 arch=arm snapshot=on $* Property changes on: tools/arm_build_mksnapshot.sh ___________________________________________________________________ Added: svn:executable + * Index: src/SConscript =================================================================== --- src/SConscript (revision 1169) +++ src/SConscript (working copy) @@ -153,9 +153,19 @@ if context.use_snapshot: mksnapshot_src = 'mksnapshot.cc' mksnapshot = env.Program('mksnapshot', [mksnapshot_src, libraries_obj, non_snapshot_files, empty_snapshot_obj], PDB='mksnapshot.exe.pdb') - snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapshot.log').abspath) + if (env.has_key('CROSSTOOL')) and (env['CROSSTOOL'] == 'on'): + #Building with cross toolchain. Cannot run mksnapshot locally. + library_objs = [non_snapshot_files, libraries_obj, empty_snapshot_obj, mksnapshot] + return (library_objs, d8_objs) + else: + snapshot_cc = env.Snapshot('snapshot.cc', mksnapshot, LOGFILE=File('snapshot.log').abspath) + snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) + libraries_obj = context.ConfigureObject(env, libraries_empty_src, CPPPATH=['.']) + elif (env.has_key('USE_SNAPSHOT_CC')) and (env['USE_SNAPSHOT_CC'] == 'on'): + # Build with a snapshot.cc already in the build dir. This is typically + # because snapshot.cc is generated on another platform. + snapshot_cc = Command('snapshot.cc', [], Touch("$TARGET")) snapshot_obj = context.ConfigureObject(env, snapshot_cc, CPPPATH=['.']) - libraries_obj = context.ConfigureObject(env, libraries_empty_src, CPPPATH=['.']) else: snapshot_obj = empty_snapshot_obj --~--~---------~--~----~------------~-------~--~----~ v8-dev mailing list [email protected] http://groups.google.com/group/v8-dev -~----------~----~----~----~------~----~------~--~---
