mac: Fix gyp tests to pass with Xcode 4.6

Changes:
* cc is now clang, not gcc
* move sdk to 10.7
* make an error message slightly less specific
Review URL: https://codereview.chromium.org/12705005

git-svn-id: http://gyp.googlecode.com/svn/trunk@1594 78cadc50-ecff-11dd-a971-7dbc132099af
improve xcode_emulation.py

+ Improved SDK path lookup: now also supports iPhoneOS and iPhoneSimulator SDKs
+ Adds support for options CLANG_CXX_LANGUAGE_STANDARD, CLANG_CXX_LIBRARY,
  CLANG_WARN_CONSTANT_CONVERSION
+ Adds support for IPHONEOS_DEPLOYMENT_TARGET (iphoneos and iphonesimulator)

BUG=none
Review URL: https://codereview.chromium.org/12725005/

Path from Kal Conley <kcconley@gmail.com>!

git-svn-id: http://gyp.googlecode.com/svn/trunk@1595 78cadc50-ecff-11dd-a971-7dbc132099af
mac: Try to get the two new clang-specific tests pass on the gyp bot (Xcode 4.2)

Not sure if 4.2 can target 10.7, so maybe it won't work.

TBR=mark
Review URL: https://codereview.chromium.org/12869006

git-svn-id: http://gyp.googlecode.com/svn/trunk@1596 78cadc50-ecff-11dd-a971-7dbc132099af
mac: Try to get test/mac/gyptest-sdkroot.py to pass on both bots and dev boxes.

Fallout from r1594.

TBR=mark
Review URL: https://codereview.chromium.org/12901002

git-svn-id: http://gyp.googlecode.com/svn/trunk@1597 78cadc50-ecff-11dd-a971-7dbc132099af
mac: More flailing trying to get tests green on the bot.

TBR=mark
Review URL: https://codereview.chromium.org/12916006

git-svn-id: http://gyp.googlecode.com/svn/trunk@1598 78cadc50-ecff-11dd-a971-7dbc132099af
mac: Try to get tests green on xcode as well.

Two tests currently fail with
error: can't exec '/Developer/Library/Xcode/PrivatePlugIns/Xcode3Core.ideplugin/Contents/Frameworks/DevToolsCore.framework/Resources/clang' (No such file or directory)

TBR=mark
Review URL: https://codereview.chromium.org/12886015/

git-svn-id: http://gyp.googlecode.com/svn/trunk@1599 78cadc50-ecff-11dd-a971-7dbc132099af
Create msvs_large_pdb workaround.

This creates a workaround for targets whose PDB sizes exceeds 1GB, using the same trick originally implemented here:

https://codereview.chromium.org/11968015/

There are currently 4 targets using this, and another 4 targets that need to use it hence the desire to centralize this functionality.

BUG=174136

Review URL: https://codereview.chromium.org/12476002

git-svn-id: http://gyp.googlecode.com/svn/trunk@1600 78cadc50-ecff-11dd-a971-7dbc132099af
Use flock on OpenBSD.

This undoes the change made in https://codereview.chromium.org/12389082 .

I have tested this on actual OpenBSD 5.2 system, and this is also
what OpenBSD www/chromium port uses.

BUG=none
Review URL: https://codereview.chromium.org/12719010/

Patch from Paweł Hajdan Jr. <phajdan.jr@chromium.org>!

git-svn-id: http://gyp.googlecode.com/svn/trunk@1601 78cadc50-ecff-11dd-a971-7dbc132099af
Make pymod_do_main work when no path is given to the .gyp file.
Review URL: https://codereview.chromium.org/12973005

git-svn-id: http://gyp.googlecode.com/svn/trunk@1602 78cadc50-ecff-11dd-a971-7dbc132099af
Fixes to msvs_large_pdb functionality to make it work with ninja.

The target_list has to be in topological order (any dependencies come before those targets that depend on them), otherwise the dependencies will not be appropriately written by the ninja generator. The unittests hid this fact because running a 'build all' just happened to cause the shim targets to be built (preparing the PDB file) prior to the final target.

This CL also includes better configuration options for the msvs_large_pdb mechanism, making it work more seamlessly (reduces the impact to Chrome's GYP files).

BUG=

Review URL: https://codereview.chromium.org/12843049

git-svn-id: http://gyp.googlecode.com/svn/trunk@1603 78cadc50-ecff-11dd-a971-7dbc132099af
make: Add rpath when linking shared objects with a non-standard suffix 

The make generator does not keep track of which targets are shared 
objects and instead relies on a target name ending with ".so". It is 
not uncommon for shared objects to be named like shared_object.so.0.1. 
Changes are unnecessary for the ninja generator, since it keeps track 
of the actual dependency type. 

BUG=gyp:329
Review URL: https://codereview.chromium.org/13133002/

Patch from Martin Robinson <martin.james.robinson@gmail.com>!

git-svn-id: http://gyp.googlecode.com/svn/trunk@1604 78cadc50-ecff-11dd-a971-7dbc132099af
Speculative fix for spurious xcode test failures on the bots.

Filter out "No recorder, buildTask: <Xcode3BuildTask:" lines from stderr
when using Xcode. They seem to be harmless noise.

Change the one custom match() function to use the string/list pattern used
in TestCmd (e.g. match_exact()) to make this reliably work.

BUG=chromium:181012
Review URL: https://codereview.chromium.org/13207004

git-svn-id: http://gyp.googlecode.com/svn/trunk@1605 78cadc50-ecff-11dd-a971-7dbc132099af
ninja/make (Xcode emulation): permit SDKROOT to be an absolute path (again)

This broke in r1595. The old logic was to compute a path for anything that
began with "macosx". The broken logic computed a path for everything. The new
logic computes a path unless it begins with "/".
Review URL: https://codereview.chromium.org/13866019

git-svn-id: http://gyp.googlecode.com/svn/trunk@1606 78cadc50-ecff-11dd-a971-7dbc132099af
Fix rpath for components when cross-compiling.

This came up while bringing up the components build for Android. Trying
to run v8_shell failed: out/Debug/v8_shell: error while loading shared
libraries: libv8.cr.so: cannot open shared object file: No such file or
directory

readelf -d out/Debug/v8_shell

shows the problem:
 0x0000000f (RPATH)                      Library rpath: [$ORIGIN/lib/]

For cross-compiles, host shared libraries are placed in /lib/host

BUG=chromium:158821

Review URL: https://codereview.chromium.org/13992005

git-svn-id: http://gyp.googlecode.com/svn/trunk@1607 78cadc50-ecff-11dd-a971-7dbc132099af
Human readable error if the gyp file isn't a dictionary

Add a human-readable error if a gyp file doesn't evaluate to a 
dictionary. I lost about 30 minutes of my life today because I had 
a spurious comma at the end of my file. This caused the gyp file 
to eval to a tuple. 

This error check is better than passing --check to gyp because 
a) the error output from --check is pretty cryptic, and b) If the 
gyp file had happened to eval to a list or a constant, CheckedEval 
wouldn't catch it. 

BUG= 
Review URL: https://codereview.chromium.org/14195004/
Patch from Greg Humpreys <humper@google.com>!

git-svn-id: http://gyp.googlecode.com/svn/trunk@1608 78cadc50-ecff-11dd-a971-7dbc132099af
Update ninja_syntax.py from upstream.

This is ninja_syntax.py as of ninja commit
368f5bc64ddd2dcea2662d6c932157314be3e09b . It's newer than the latest
ninja release because I want to provide an opt-in flag for the "deps"
feature, which isn't in a ninja release yet.

TBR=scottmg
Review URL: https://codereview.chromium.org/13915013

git-svn-id: http://gyp.googlecode.com/svn/trunk@1609 78cadc50-ecff-11dd-a971-7dbc132099af
ninja: Add an opt-in option for the new deps feature.

This is supposed to be used for letting a couple of folks opt in to this new
feature (which requires a ninja trunk build), to help stabilize deps mode in
ninja. Once there's a stable ninja release with the feature (and ninja in
depot_tools was updated), this will be turned on by default.

Use this by passing -Guse_deps=1 to ninja (or adding use_deps=1 to the
GYP_GENERATOR_FLAGS env var). It's off by default.

deps mode on windows needs more work, so this opt-in is linux/mac only for
now.
Review URL: https://codereview.chromium.org/14180006

git-svn-id: http://gyp.googlecode.com/svn/trunk@1610 78cadc50-ecff-11dd-a971-7dbc132099af
xcode_emulation: Do not redirect stderr when calling xcodebuild.

For someone, `xcodebuild -version -sdk macosx10.6 Path` would print

    2013-04-12 17:18:59.803 xcodebuild[39147:f07] Error loading /Users/alexisme/Library/Developer/Xcode/Third-Party Plug-ins/CodePilot2.xcplugin/Contents/MacOS/CodePilot2:  dlopen(/Users/alexisme/Library/Developer/Xcode/Third-Party Plug-ins/CodePilot2.xcplugin/Contents/MacOS/CodePilot2, 265): Symbol not found: _IDEEditorDocumentDidChangeNotification
      Referenced from: /Users/alexisme/Library/Developer/Xcode/Third-Party Plug-ins/CodePilot2.xcplugin/Contents/MacOS/CodePilot2
      Expected in: flat namespace
     in /Users/alexisme/Library/Developer/Xcode/Third-Party Plug-ins/CodePilot2.xcplugin/Contents/MacOS/CodePilot2
    2013-04-12 17:18:59.804 xcodebuild[39147:f07] WARNING: Failed to load plugin at: /Users/alexisme/Library/Developer/Xcode/Third-Party Plug-ins/CodePilot2.xcplugin, skipping.  Could not load bundle.

to stderr. This was captured too and got added to the sdk path, which caused
a hard-to-understand exception later one. There's no reason to redirect
stderr, just let it print to the console instead.
Review URL: https://codereview.chromium.org/14163004

git-svn-id: http://gyp.googlecode.com/svn/trunk@1611 78cadc50-ecff-11dd-a971-7dbc132099af
ninja windows: Fully qualify path to cl.exe

Part of upgrading to ninja trunk with more efficient dependency
tracking.

Does path search for correct cl.exe at generation time rather than
relying on the path being set properly.

Supports CC_wrapper/CXX_wrapper for goma/distcc. *_wrapper variables
are now supported from the environment on all platforms.

R=thakis@chromium.org
BUG=chromium:232421

Review URL: https://codereview.chromium.org/13950005

git-svn-id: http://gyp.googlecode.com/svn/trunk@1612 78cadc50-ecff-11dd-a971-7dbc132099af
Dropping the scons generator.

The scons generator has not been used for some time and is known to no longer
be at parity with the other generators.
Dropping it to reduce the ongoing maintenance burden.

BUG=None
TEST=None
R=mark@chromium.org

Review URL: https://codereview.chromium.org/13869005

git-svn-id: http://gyp.googlecode.com/svn/trunk@1613 78cadc50-ecff-11dd-a971-7dbc132099af