Change ninja rpath generation to be more like make.

Currently, the ninja generator adds -Wl,rpath in every executable for
linux targets, while the make generator includes it only for those
with .so dependencies. This patch changes the ninja generator to
behave like make.

Added a linux-specific unit test to verify the value and absence of
the rpath for executables with and without solib dependencies.

BUG=gyp:315
TEST=On linux: unit tests pass (45 no result), full
Chrome build no longer has rpath on chrome_sandbox.
Review URL: https://codereview.chromium.org/11821060/

Patch from Chris Wolfe <cwolfe@chromium.org>!



git-svn-id: http://gyp.googlecode.com/svn/trunk@1559 78cadc50-ecff-11dd-a971-7dbc132099af
windows: Add support for overriding pdb name for compile step

And test for same for both msvs and ninja generator.

Part of solving http://crbug.com/170186
Review URL: https://codereview.chromium.org/11937003

git-svn-id: http://gyp.googlecode.com/svn/trunk@1560 78cadc50-ecff-11dd-a971-7dbc132099af
Add android test runner to buildbot_run.

Add a build step that can check out and build an Android tree suitable
for running the 'android' format gyp tests, and run this when the builder
is gyp-android.

BUG=165463
Review URL: https://codereview.chromium.org/11919005

git-svn-id: http://gyp.googlecode.com/svn/trunk@1561 78cadc50-ecff-11dd-a971-7dbc132099af
Update GYP PRESUBMIT.py to adhere to the new copyright boilerplace policy.

BUG=chromium:140977
Review URL: https://codereview.chromium.org/11967026

git-svn-id: http://gyp.googlecode.com/svn/trunk@1562 78cadc50-ecff-11dd-a971-7dbc132099af
Android: use relative paths for action/rule/copy names.

qualified_target is an absolute path; create a relative version for use
when generating names of actions/rules/copies. This avoids including
the absolute path of the source tree in the makefiles, making
regeneration cleaner.
Review URL: https://codereview.chromium.org/11967045

git-svn-id: http://gyp.googlecode.com/svn/trunk@1563 78cadc50-ecff-11dd-a971-7dbc132099af
android: Filter host tools out of PATH.

When running actions/rules we need to filter the Android host tools out
of the PATH because they include some tools that are not suitable for
being executed outside of the normal Android build rules (like a custom
version of bison).
Review URL: https://codereview.chromium.org/12016019

git-svn-id: http://gyp.googlecode.com/svn/trunk@1564 78cadc50-ecff-11dd-a971-7dbc132099af
ninja windows: Make pch work on VS2012, and simplify implementation

Previously, the chromium .gypi files injected a .cc file for PCH, which compiled "normally", and then the generator compiled it again (to a different .obj). Now, the build rule for the injected .cc has its ccflags modified to cause generation of the pch, which matches the msvs generator. Also get to remove the ugly separate 'cc_pch'/'cxx_pch' rules.

I believe this will also fix some very unreproducible build errors we were having (the linked bug) because the dependencies for the pch pdb is much simpler.

BUG=142362, 143646
Review URL: https://codereview.chromium.org/12052029

git-svn-id: http://gyp.googlecode.com/svn/trunk@1565 78cadc50-ecff-11dd-a971-7dbc132099af
Xcode: Coalesce multiple "copies" sections in the same target with the same
"destination" property into the same PBXCopyFilesBuildPhase.

TEST=gyptest.py test/copies/gyptest-samedir.py
Review URL: https://codereview.chromium.org/12088112

git-svn-id: http://gyp.googlecode.com/svn/trunk@1566 78cadc50-ecff-11dd-a971-7dbc132099af
Speculative fix for mt.exe general error c101008a (The parameter is incorrect).

The fix makes sure that the target manifest file is deleted before running mt.exe.

BUG=173052

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


git-svn-id: http://gyp.googlecode.com/svn/trunk@1567 78cadc50-ecff-11dd-a971-7dbc132099af
Reverting accidental change to test/lib/TestGyp.py


git-svn-id: http://gyp.googlecode.com/svn/trunk@1568 78cadc50-ecff-11dd-a971-7dbc132099af
windows: test for msvs_shard and support in ninja

Main code moved from msvs.py to MSVSUtil.py (named to correspond with the rest of the MSVS helper files), and then also used in the ninja generator.

Functionality was not tested before afaict, so added a simple test that uses msvs_shard in the same way Chromium uses it (on a static_library target).

BUG=chromium:166201
Review URL: https://codereview.chromium.org/12208026

git-svn-id: http://gyp.googlecode.com/svn/trunk@1569 78cadc50-ecff-11dd-a971-7dbc132099af
mac strip test: Update expectations for Xcode 4 toolchain.

The bots switched to Xcode 4.2 recently. Like a comment in the
test says:

  # The actual numbers here are not interesting, they just need to be the same
  # in both the xcode and the make build.
Review URL: https://codereview.chromium.org/12212154

git-svn-id: http://gyp.googlecode.com/svn/trunk@1570 78cadc50-ecff-11dd-a971-7dbc132099af
xcodebuild: Fix most rebuild tests on Xcode 4.

BUG=chromium:175867
Review URL: https://codereview.chromium.org/12221156/

git-svn-id: http://gyp.googlecode.com/svn/trunk@1571 78cadc50-ecff-11dd-a971-7dbc132099af
xcode tests: Update exit codes for Xcode 4.

Fixes gyptest-ldflags-passed-to-libtool.py. Change other tests checking
the exit code for consistency.

BUG=chromium:175867
Review URL: https://codereview.chromium.org/12221160/

git-svn-id: http://gyp.googlecode.com/svn/trunk@1572 78cadc50-ecff-11dd-a971-7dbc132099af
Fix test/mac/gyptest-app.py with Xcode 4.2.

Xcode 4.2 got stricter about strings files. Make make and ninja stricter too.

BUG=chromium:175867
Review URL: https://codereview.chromium.org/12231007

git-svn-id: http://gyp.googlecode.com/svn/trunk@1573 78cadc50-ecff-11dd-a971-7dbc132099af
xcode: Add support for storyboard files

Patch from Amit Joshi <amit@chromium.org>!
Review URL: https://codereview.chromium.org/12213116/

git-svn-id: http://gyp.googlecode.com/svn/trunk@1574 78cadc50-ecff-11dd-a971-7dbc132099af
Detect all ninja's include dirs in Eclipse generator. 

The Eclipse generator assumed that SHARED_INTERMEDIATE_DIR was at 
out/ConfigName/obj/gen, which is true when using make. When using 
ninja, it's at out/ConfigName/gen. The Eclipse generator now lists 
include dirs in both locations, so it will work with either build 
systems. 

BUG=chromium:176031
TEST=Set up eclipse, import the include dirs and symbols generated by 
this generator, index everything, check that there aren't too many 
indexer errors.

Patch from Newton Allan <newt@chromium.org>!
Review URL: https://codereview.chromium.org/12220141/

git-svn-id: http://gyp.googlecode.com/svn/trunk@1575 78cadc50-ecff-11dd-a971-7dbc132099af
make, ninja: Let a failing postbuild stop all later postbuilds for the same target.

Previously, all postbuilds would always be run. The old behavior matches Xcode 3,
the new behavior matches Xcode 4.

BUG=chromium:175867
Review URL: https://codereview.chromium.org/12230023

git-svn-id: http://gyp.googlecode.com/svn/trunk@1576 78cadc50-ecff-11dd-a971-7dbc132099af
Set the correct architecture for the MIDL compiler

Patch from jschuh@chromium.org

git-svn-id: http://gyp.googlecode.com/svn/trunk@1577 78cadc50-ecff-11dd-a971-7dbc132099af
ninja: Pass -rpath-link when passing -rpath.

Gold works fine without -rpath-link, but GNU ld needs it. The make generator already does this.
To quote the previous make generator CL:
"it appears that ld.bfd is not $ORIGIN-aware and needs additional information to figure out where to find shared libraries that shared libraries depend on"
Review URL: https://codereview.chromium.org/12335018

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