De-hardcode link concurrency for Windows.

it's not needed anymore as we're using the GYP_USE_SEPARATE_MSPDBSRV flag on the Windows builders.

BUG=333000, 335607
R=scottmg@chromium.org, robertshield@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1842 78cadc50-ecff-11dd-a971-7dbc132099af
Xcode: Add .xcassets = folder.assetcatalog in extension_map

This allows lastKnownFileType to be set for files named, for instance,
Images.xcassets.

Patch by Matthew DeVore <matvore@google.com>
Review URL: https://codereview.chromium.org/140103003/


git-svn-id: http://gyp.googlecode.com/svn/trunk@1843 78cadc50-ecff-11dd-a971-7dbc132099af
Eclipse generator now uses compiler's default include dirs.

This adds support to the Eclipse gyp generator for detecting the
compiler's default include directories and adding them to the list of
include dirs. This finally fixes a long-standing bug where size_t was
not defined in the Android Eclipse setup.

BUG=336982
Review URL: https://codereview.chromium.org/145363002/

Patch from Newton Allen <newt@chromium.org>!


git-svn-id: http://gyp.googlecode.com/svn/trunk@1844 78cadc50-ecff-11dd-a971-7dbc132099af
Quell warnings for exclusion list dictionaries in MSVS generator.

When using ! or / filtering mechanisms on MSVS tool dictionaries, the resulting automatically created exclusion list dictionary causes the generator to complain that the setting name is unknown. This silences these spurious warnings.

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1845 78cadc50-ecff-11dd-a971-7dbc132099af
Ninja generator: support using clang-cl for Windows 

If CC is set to 'clang-cl' in make_global_settings, use that 
as the compiler instead of cl.exe from the environment. 

BUG=chromium:82385
Review URL: https://codereview.chromium.org/136113016/

Patch from Hans Wennborg <hans@chromium.org>


git-svn-id: http://gyp.googlecode.com/svn/trunk@1846 78cadc50-ecff-11dd-a971-7dbc132099af
Ninja generator: check if meminfo exists before reading it.

This CL helps cross-compile work well. Linux doesn't have to have /proc/meminfo.
For example, chroot doesn't have it.

Patch from dongseong.hwang@intel.com.

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1847 78cadc50-ecff-11dd-a971-7dbc132099af
Fix comparison of Xcode version

The methods _XcodeVersion returns a tuple with two strings (Xcode
version and Xcode build), so we should check the version against
the first value of the tuple.

BUG=None
R=mark@chromium.com

git-svn-id: http://gyp.googlecode.com/svn/trunk@1848 78cadc50-ecff-11dd-a971-7dbc132099af
Extract XcodeVersion to be a standalone module function

The _XcodeVersion from XcodeSettings class does not need to be a member
function as it does not use any of the field of the class. Extract it
to be a standalone function at the module level, and all the functions
it calls (that also don't use fields from XcodeSettings).

Keep the _XcodeVersion wrapper function that keeps a cache of the
values returned from Xcode to not degrade performance for clients of
the old API that may depends on that cache.

BUG=None
R=mark@chromium.org, thakis@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1849 78cadc50-ecff-11dd-a971-7dbc132099af
Improve ninja's Xcode emulation

When cloning the target dictionaries for "iphoneos", correctly filter
the ARCHS value to only include value that apply to the SDK (iphoneos
or iphonesimulator).

Take into consideration the VALID_ARCHS filter if defined and support
the $(ARCHS_STANDARD) and $(ARCHS_STANDARD_INCLUDING_64_BIT) defaults
from Xcode 5.0.

If ARCHS is not set (which is the default for most of the projects)
then result will be identical, but it can now be set to the macro
$(ARCHS_STANDARD_INCLUDING_64_BIT) to build correctly for arm64 and
armv7 with both ninja and Xcode (including xcodebuild).

Update test/ios/gyptest-archs.py to test build for both simulator
and device, with different configuration (no ARCHS and filter that
only keep 32-bit platforms, explicit ARCHS with filters for 32-bit
or 64-bit platforms, and explicit ARCHS with no filter). This breaks
the test with the "make" generator as its support for Xcode emulation
is inexistant.

BUG=http://crbug.com/339477
R=justincohen@chromium.org, mark@chromium.org, thakist@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1850 78cadc50-ecff-11dd-a971-7dbc132099af
Use "formats" parameter to TestGyp to filter the format

BUG=None
R=mark@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1851 78cadc50-ecff-11dd-a971-7dbc132099af
Fix generation for ninja of multiarch executable targets

Chromium includes some targets that should only be compiled on
specific platform and end up with an empty 'sources' list. This
works when generating for a single architecture, but fails with
the following callstack when building for multiarch:

Traceback (most recent call last):
  File "./gyp/gyp_main.py", line 18, in <module>
    sys.exit(gyp.script_main())
  File "./gyp/pylib/gyp/__init__.py", line 534, in script_main
    return main(sys.argv[1:])
  File "./gyp/pylib/gyp/__init__.py", line 527, in main
    return gyp_main(args)
  File "./gyp/pylib/gyp/__init__.py", line 512, in gyp_main
    generator.GenerateOutput(flat_list, targets, data, params)
  File "./gyp/pylib/gyp/generator/ninja.py", line 2160, in GenerateOutput
    config_name)
  File "./gyp/pylib/gyp/generator/ninja.py", line 2078, in GenerateOutputForConfig
    target = writer.WriteSpec(spec, config_name, generator_flags)
  File "./gyp/pylib/gyp/generator/ninja.py", line 488, in WriteSpec
    self.target.actions_stamp or actions_depends)
  File "./gyp/pylib/gyp/generator/ninja.py", line 1180, in WriteTarget
    self.target.binary = self.WriteLink(spec, config_name, config, link_deps)
  File "./gyp/pylib/gyp/generator/ninja.py", line 972, in WriteLink
    for arch in self.archs]
TypeError: list indices must be integers, not str

This is because |link_deps| must be a dictionary keying |arch| to
a list of link dependencies when building for multiarch, but if
'sources' is empty, |link_deps| keep its default value (empty list).

BUG=314720
R=justincohen@chromium.org, mark@chromium.org, justincohen, mark

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1852 78cadc50-ecff-11dd-a971-7dbc132099af
ninja: Let TOC code use $lib instead of ${lib}.

No functionality change, but more consistent with -MF $out.d, and the
generated files shrink by a few bytes too.

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1853 78cadc50-ecff-11dd-a971-7dbc132099af
Cache Xcode version at the module level

XcodeVersion may end up being called many times when building large
projects, so cache the version for performance reason. The xcodebuild
command has also been observed to return incorrect values when called
by multiple processes in parallel, so reducing the number of calls
here reduce the risk of encountering this issue.

BUG=408
R=justincohen@chromium.org, thakis@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1854 78cadc50-ecff-11dd-a971-7dbc132099af
Fix a local rule reference

BUG=None
R=thakis@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1855 78cadc50-ecff-11dd-a971-7dbc132099af
VS 2013 emits a warning when two source files have the same
name; but it also does this when one of the files is excluded
from the build, which I think is a bug.

Adding the IgnoreWarnCompileDuplicatedFilename key will
suppress this warning; it does so also for files that are
not excluded, but this shouldn't be a problem because gyp
itself already warns in this case.

See this page for more information:

  <http://connect.microsoft.com/VisualStudio/feedback/details/797460/incorrect-warning-msb8027-reported-for-files-excluded-from-build>

Patch from stk.haller@googlemail.com.

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1856 78cadc50-ecff-11dd-a971-7dbc132099af
android: set ASFLAGS as well as CFLAGS.

The Android build system doesn't use CFLAGS for assembly source files,
but gyp expects this. Set LOCAL_ASFLAGS in gyp-generated targets to the
same as LOCAL_CFLAGS.

BUG=
R=thakis@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1857 78cadc50-ecff-11dd-a971-7dbc132099af
Globally ignore '*_excluded' keys for MSVS Settings

This extends validation of MSVS settings to ignore any key found that is suffixed with '_excluded', but still verifies that the root key name is a valid setting.

Patch from Eric N. Vander Weele <ericvw@gmail.com>

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1858 78cadc50-ecff-11dd-a971-7dbc132099af
Clean up the filters in the MSVS generator, for VS >= 2010

Addendum to r1804. The fix in that revision only works
for VS 2008; for 2010 and later we generate one filter
per source file, so in order to clean these up, we must
prune sibling filters as long as they all have the same
name.

Patch by stk.haller@googlemail.com.

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1859 78cadc50-ecff-11dd-a971-7dbc132099af
Introduce the 'link_dependency' attribute that removes the targets having this
attribute from the 'none' targets' dependencies.

The intention behind this change is to let the users have static_library or
shared_library targets on which _every_ other executable/shared_library target
must depend, without introducing excessive dependencies on the former ones from
the 'none' metatargets (such excessive dependencies may trigger generator bugs
like https://code.google.com/p/gyp/issues/detail?id=409).

Patch by Alexander Potapenko <glider@chromium.org>

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


git-svn-id: http://gyp.googlecode.com/svn/trunk@1860 78cadc50-ecff-11dd-a971-7dbc132099af
Allow support target name suffix to be customized 

This will allow targets to be generated where spaces aren't desirable in target names. 

Patch by Daniel Wagner-Hall <danielwh@google.com>

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


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