android: Support host multilib builds.

The Android build system now supports multilib 32/64-bit host builds as
well as target builds, and Chromium needs to make use of this to
properly support compiling V8 for host. Introduce a GYP_HOST_VAR_PREFIX
variable that works equivalently to GYP_VAR_PREFIX and use it in all the
places where the first/second host architecture must be selected, and
also introduce GYP_HOST_MULTILIB to enable the top level makefile to
specify whether it wants 32-bit or 64-bit host binaries.

BUG=chromium:358141
Review URL: https://codereview.chromium.org/301373002

Patch from Torne <torne@chromium.org>!


git-svn-id: http://gyp.googlecode.com/svn/trunk@1970 78cadc50-ecff-11dd-a971-7dbc132099af
Support for custom NM/readelf binaries in your toolchain.

Background: nm and readelf are used by ninja.py to generate
.TOC files. These .TOC files are what determine when something
needs rebuilding.

ninja.py uses distinct commands for host vs target tools for most things
in the toolchain (cc, c++, ld,), via make_global_settings, but it fails to do so
for nm & readelf. This is not by design, but it has worked thus far by chance:
The default 'nm' and 'readelf' in most people's PATH are the system variants,
and the Linux versions of these tools happen to work.

However, the project I'm working on has engineers on Macs developing for
android. The system-supplied 'nm' and 'readelf' on Mac do NOT work for
e.g. Android arm binaries, which leads me to this fix. This fix allows for
specifying NM and READELF via make_global_settings, so we can point those
variables to the correct ones for the given toolchain/target.

BUG=
R=thakis@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1971 78cadc50-ecff-11dd-a971-7dbc132099af
Makes matching of build files work when absolute

Matching wasn't working if paths supplied were absolute. gyp_chromium
triggers absolute paths, so picking up modified gyp/gypi files wasn't
working when analyzer run from chrome.

BUG=109173
TEST=none
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1972 78cadc50-ecff-11dd-a971-7dbc132099af
Changes the ninja generator to output phony targets for uninteresting targets

This way you can pass these targets to the build system and not get
errors.

BUG=410410
TEST=covered by test now
R=thakis@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1973 78cadc50-ecff-11dd-a971-7dbc132099af
Changes ninja generator to only output empty names if not already output

This builds on https://codereview.chromium.org/543743003/ .

BUG=410410
TEST=covered by test now
R=thakis@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1974 78cadc50-ecff-11dd-a971-7dbc132099af
Fix indentation for emacs and add missing keyword.

Closing brackets are now properly indented with the opening
bracket.
Also adds "cflags_cc" in the list of keywords

BUG=
Review URL: https://codereview.chromium.org/560263003/
R=gavinp@chromium.org

Patch from Fabrice de Gans-Riberi <fdegans@chromium.org>!


git-svn-id: http://gyp.googlecode.com/svn/trunk@1975 78cadc50-ecff-11dd-a971-7dbc132099af
android: Don't emit useless info into generated makefiles.

To make the generated makefiles smaller and slightly easier to debug,
omit information that is useless:

* Don't emit LDFLAGS for static libraries as the linker is not invoked.

* For static libraries, only include system libraries in the lists of
  libraries to link against. The system libraries are required in case
  they provide implicit include paths, but there's no need to include
  the large list of gyp-generated targets.

* Don't emit empty lists of libraries to link against.

* Don't bother setting LOCAL_MODULE_TAGS to optional as that's the
  default value.

Also, stop attempting to remove standard system include paths; the list
is out of date, never matches anything in the Chromium build, and it
doesn't really matter if a standard path is duplicated anyway.

BUG=
R=primiano@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1976 78cadc50-ecff-11dd-a971-7dbc132099af
android: Add a way to override build system variables.

Add a key 'aosp_build_settings' which a target can use to set Android
build system variables in the generated makefile, for edge cases not
directly supported by gyp. aosp_build_settings is a dictionary which
maps variable names to values (values may be integers, strings or lists;
all values will be quoted appropriately for make and lists will be
converted to whitespace-separated form).

BUG=
R=primiano@chromium.org, thakis@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1977 78cadc50-ecff-11dd-a971-7dbc132099af
Don't return unfound VS version, raise instead

This fallback behaviour may have worked at some point, but doesn't
any more, so simply error out with a clear message rather than trying
to continue.

R=timurrrr@chromium.org
BUG=https://groups.google.com/a/chromium.org/forum/#!topic/chromium-dev/O_OGfq2nhSw

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1978 78cadc50-ecff-11dd-a971-7dbc132099af
Don't run windows tests on other platforms

Build fix

TBR=timurrrr@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1979 78cadc50-ecff-11dd-a971-7dbc132099af
Adds swift file support to xcode generation.

BUG=
Patch from Josh Converse <jconverse@google.com>!

R=justincohen@chromium.org, thomasvl@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1980 78cadc50-ecff-11dd-a971-7dbc132099af
I need this change to create Windows 8.1/Windows Phone 8.1 projects that compile modules that can be consumed by Windows Store Applications (WinRT).

This change is required as a prerequisite to adding proper Windows Store (8.1 only) support to Google's ANGLE codebase.

Patch from coopp@microsoft.com.

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1981 78cadc50-ecff-11dd-a971-7dbc132099af
Revert r1978 and r1979

BUG=

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1982 78cadc50-ecff-11dd-a971-7dbc132099af
Revert "I need this change to create Windows 8.1/Windows Phone 8.1 projects that compile modules that can be consumed by Windows Store Applications (WinRT)."

This reverts commit 397b1c684b0b07a38f485f091cc4394a3d733334.

Failing on win64 bots per http://build.chromium.org/p/tryserver.nacl/builders/gyp-win64/builds/1896

BUG=

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1983 78cadc50-ecff-11dd-a971-7dbc132099af
ninja win: Add support for 'CallingConvention'

Each calling convention decorates C functions in a different way, so we can use
that to test the flag.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1984 78cadc50-ecff-11dd-a971-7dbc132099af
Added msvs_enable_winrt to enable creating Windows Store compatible projects for .dlls that are consumed by WinRT applications.

Patch from coopp@microsoft.com.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1985 78cadc50-ecff-11dd-a971-7dbc132099af
Add support for MIDL include directories

This adds support for 'midl_include_dirs', which is handled like 'include_dirs'
and 'resource_include_dirs', except this is for the MIDL tool.

One notable difference is that, unlike 'resource_include_dirs', the
'midl_include_dirs' property doesn't default to 'include_dirs'.  This is to
prevent any change in behavior for any existing gyp files that don't set
'midl_include_dirs'.  Also, MIDL include directories are quite a different
concept to C/C++ include directories.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1986 78cadc50-ecff-11dd-a971-7dbc132099af
ninja: Don't rerun actions/rules based on where gyp was invoked

Right now, ninja generates unique names for actions/rules by combining the
action/rule name with a hash on the qualified_target.  However, the path of the
qualified_target is relative to where gyp was invoked from.  So, the following
gyp command:

  gyp --depth=. foo/bar.gyp

will generate a different hash than:

  cd foo
  gyp --depth=../ bar.gyp

Since the hash is different, this causes actions/rules to get rerun based on
where gyp happened to be invoked from.

This commit fixes this issue by using a qualified_target relative to the
toplevel_dir, rather than the current working directory.  Also, the
self.qualified_target in NinjaWriter is only used for the hash, so we can
remove it and replace it with a precomputed hash for all actions/rules.

BUG=
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1987 78cadc50-ecff-11dd-a971-7dbc132099af
Add Ninja support for MSVS $(TargetExt), $(TargetFileName) and $(TargetPath) macros.

BUG=gyp:462
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1988 78cadc50-ecff-11dd-a971-7dbc132099af
Merge pull request #1 from svn2github/master

pull upstream