Building Google Dart from source (Mac OS X Lion + Xcode 4.2)

posted 16 Dec 2011, 08:00 by Masahiro Takatsuka   [ updated 16 Dec 2011, 08:02 ]
I've been using Google DartEditor, but it's distribution does not come with some tools.
I've decided to build everything from its source, and here is the things I had to do to build Google Dart on Mac OS X Lion with Xcode 4.2:

  • installed the latest Xcode,
  • install node.js
  • install depot_tools
    • svn co
    • add depot_tools to my PATH in .bashrc
  • get source
gclient config
gclient sync
  • add the following in tools/ (starting at line 108)
        args = ['xcodebuild',
  • modify GCC_VERSION for tools/gyp/configurations_xcode.gypi as
'xcode_settings': {
          # To switch to the LLVM based backend change the two lines below.
          'GCC_VERSION': '',
          #'GCC_VERSION': '4.2',
  • run
gclient unhooks
  • Then build (I tried with --arch=x64 but 
./tools/ --arch=ia32 -m release
    • I've tried with --arch=x64 but it gave me the following error..if its something unimplemented..forget it..
PhaseScriptExecution "Action \"generate_frogsh\"" /Users/masa/Documents/Dev/dart/dart/xcodebuild/
        cd /Users/masa/Documents/Dev/dart/dart/frog
          /bin/sh -c /Users/masa/Documents/Dev/dart/dart/xcodebuild/
        note: Generating frogsh file
          ./vm/code_generator_x64.h:36: error: unimplemented code
            VM exited with signal 6