external/gyp.git
2 days agoninja: Add support for 'ninja_use_console' in actions/rules master
sbaig1@bloomberg.net [Fri, 25 Jul 2014 13:29:18 +0000 (13:29 +0000)]
ninja: Add support for 'ninja_use_console' in actions/rules

Setting this to 1 will make ninja use 'pool = console' for the action/rule.

BUG=
R=thakis@chromium.org

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

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

3 days agoThis CL adds support for extension in GYP.
sdefresne@chromium.org [Thu, 24 Jul 2014 08:10:57 +0000 (08:10 +0000)]
This CL adds support for extension in GYP.

This CL adds the extension target type and adds the link flags to
compile .appex extensions.

BUG=gyp:435
R=justincohen@chromium.org, mark@chromium.org, pkl@chromium.org, sdefresne@chromium.org

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

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

7 days agoninja/win: Put common msvs_system_include_dirs into %INCLUDE%
thakis@chromium.org [Sun, 20 Jul 2014 16:12:36 +0000 (16:12 +0000)]
ninja/win: Put common msvs_system_include_dirs into %INCLUDE%

Paths in INCLUDE are considered system headers by clang-cl and it will suppress
warnings from system headers.

BUG=chromium:395405
Review URL: https://codereview.chromium.org/406523005/

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

7 days agoAdd test files for https://codereview.chromium.org/406523005/
thakis@chromium.org [Sun, 20 Jul 2014 05:57:33 +0000 (05:57 +0000)]
Add test files for https://codereview.chromium.org/406523005/

Maybe the try failures are due to the try server not adding the new files
correctly, since the test passes for me locally. Add the test files in a
separate commit (not used by anything yet) to test this theory.

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

11 days agoFixes bug in path handling of analyzer
sky@chromium.org [Wed, 16 Jul 2014 22:54:32 +0000 (22:54 +0000)]
Fixes bug in path handling of analyzer

Was using os.getcwd when it needs to use options.toplevel_dir

R=mark@chromium.org
BUG=383609
TEST=none

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

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

2 weeks agoFixes two bugs in analyzer
sky@chromium.org [Fri, 11 Jul 2014 16:21:43 +0000 (16:21 +0000)]
Fixes two bugs in analyzer

Wasn't delaing with relative paths outside the repo. NACL does this
for things like /usr/include/...
When combining relative paths I was missing adding a '/'. This result
in paths like baseobserver_list.h instead of base/observer_list.h.

BUG=383609
TEST=covered by unit tests
R=mark@chromium.org

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

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

4 weeks agoXcode: Add xcdatamodeld = wrapper.xcdatamodeld in extension_map
mark@chromium.org [Thu, 26 Jun 2014 13:09:08 +0000 (13:09 +0000)]
Xcode: Add xcdatamodeld = wrapper.xcdatamodeld in extension_map

.xcdatamodeld documents are used for Model File Format.
https://developer.apple.com/library/mac/documentation/Cocoa/Conceptual/CoreDataVersioning/Articles/vmModelFormat.html

Note that .xcdatamodel has already been supported since gyp r1529.

BUG=303

Patch from Roberto Cosenza <robcos@google.com>
via Yohei Yukawa <yukawa@chromium.org>

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

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

4 weeks agoIntroduce '--no-duplicate-basename-check' option to disable the check of duplicate...
yukawa@chromium.org [Wed, 25 Jun 2014 01:48:30 +0000 (01:48 +0000)]
Introduce '--no-duplicate-basename-check' option to disable the check of duplicate basenames

With this CL, the check of duplicate basenames in the same source list can be disabled with '--no-duplicate-basename-check' option.

Now GYP generators can handle duplicate basenames except for VCProj generator for Visual C++ 2008 and Makefile generator on Mac. Given that these two generators are no longer actively used, and supposed to be deprecated in future, providing an option to disable this validation should be helpful for some GYP users.

Note that these two generators continue to treat duplicate basenames continue as an error regardless of '--no-duplicate-basename-check'.

BUG=gyp:264, gyp:384
R=scottmg@chromium.org

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

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

4 weeks agoMakes analyzer strip off a leading path separator
mark@chromium.org [Mon, 23 Jun 2014 18:18:44 +0000 (18:18 +0000)]
Makes analyzer strip off a leading path separator

When running in chrome paths are absolute.

Also makes chrome build work with analyzer on windows. The specific define I
ran into was MSVS_OS_BITS, but I'm sure there are more.

BUG=chromium:383609
R=mark@chromium.org

Patch by Scott Violet <sky@chromium.org>
Review URL: https://codereview.chromium.org/347193005/

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

5 weeks agomsvs: ensure that failing actions make the build fail with multiple actions
scottmg@chromium.org [Fri, 20 Jun 2014 17:42:59 +0000 (17:42 +0000)]
msvs: ensure that failing actions make the build fail with multiple actions

The old way of joining multiple commands would take care of failing correctly
when there are multiple actions associated with a single file. However, for
multiple actions associated with different files (but within the same target),
Visual Studio will still create just one .bat file for them all, so we must
make sure that each command errors out correctly when it fails.

Strictly speaking, the %errorlevel% check is unnecessary for the last command
in a target (because the .bat file created by VS contains it already); but it
doesn't hurt either, and makes the logic much simpler.

Patch from Stefan Haller <stk.haller@googlemail.com>.

R=scottmg@chromium.org

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

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

5 weeks agoninja: Pass .so files outside of --start-group/--end-group.
thakis@chromium.org [Tue, 17 Jun 2014 23:59:21 +0000 (23:59 +0000)]
ninja: Pass .so files outside of --start-group/--end-group.

When doing 32bit release component builds of chromium, nacl_helper fails to
link like so:

g++ [...] -Wl,--as-needed -o nacl_helper -Wl,--start-group [...] obj/components/libnacl_linux.a [...] lib/libppapi_shared.so -Wl,--end-group [...]

  /usr/bin/ld: .../nacl_linux.plugin_main.o: undefined reference to symbol '_ZN5ppapi16PPB_Audio_Shared18SetThreadFunctionsEPK18PP_ThreadFunctions'
  /usr/bin/ld: note: '_ZN5ppapi16PPB_Audio_Shared18SetThreadFunctionsEPK18PP_ThreadFunctions' is defined in DSO lib/libppapi_shared.so so try adding it to the linker command line

Note that libppapi_shared.so is on the link line.  The error goes away if
--as-needed isn't passed, if I use gold, or if the .so file is moved after
--end-group.  http://wiki.gentoo.org/wiki/Project:Quality_Assurance/As-needed
suggests that --as-needed has additional constraints on library ordering, and
I'm guessing that this error depends on how the implementations of
--as-needed and --start-group/--end-group in ld.bfd interact.

Moving $solibs out of --start-group/--end-group seems to work, so just do that.
No test because we have no 32bit linux gyp bot.

BUG=none (but found while working on 368384 / 385472)
TEST=Build nacl_test on a 32bit release bot using the components build. links correctly
R=scottmg@chromium.org

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

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

5 weeks ago[gyp][Android] Implement TestGypAndroid.run_built_executable.
torne@chromium.org [Tue, 17 Jun 2014 11:39:16 +0000 (11:39 +0000)]
[gyp][Android] Implement TestGypAndroid.run_built_executable.

Note that this includes buildbot steps to start and stop an Android emulator
for testing.

BUG=gyp:324
R=bradnelson@google.com, torne@chromium.org

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

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

5 weeks agoTeach Ninja generator about 'AR.host' specified in 'make_global_settings'.
yukawa@chromium.org [Mon, 16 Jun 2014 17:37:45 +0000 (17:37 +0000)]
Teach Ninja generator about 'AR.host' specified in 'make_global_settings'.

With this CL, Ninja generator starts recognizing 'AR.host' specified in 'make_global_settings', like Make generator.

BUG=gyp:434
TEST=unittest
R=scottmg@chromium.org

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

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

5 weeks agoTeach Ninja generator about 'LD'/'LD.host' specified in 'make_global_settings_ld'.
yukawa@chromium.org [Mon, 16 Jun 2014 16:12:51 +0000 (16:12 +0000)]
Teach Ninja generator about 'LD'/'LD.host' specified in 'make_global_settings_ld'.

With this CL, Ninja generator starts recognizing 'LD'/'LD.host' specified in 'make_global_settings', like Make generator.  This makes it easier for you to share the code among host/NaCl/NDK/Emscripten build targets.

BUG=gyp:434
TEST=unittest
R=scottmg@chromium.org

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

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

5 weeks agoRevise unittest for 'AR' in 'make_global_settings'
yukawa@chromium.org [Mon, 16 Jun 2014 16:09:41 +0000 (16:09 +0000)]
Revise unittest for 'AR' in 'make_global_settings'

This is a follow up CL for r1931 and r1935. This is just a revise of a unittest and does not changes existing functionality.

It turned out that we need to specify GYP_CROSSCOMPILE=1 to test 'AR'/'AR.host'
properly. Expected results, which correspond to the current behavior atually, are updated accordingly.

BUG=gyp:434
TEST=unittest
R=scottmg@chromium.org

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

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

6 weeks agoRevise unittest for 'LD' in 'make_global_settings'
yukawa@chromium.org [Sat, 14 Jun 2014 05:45:51 +0000 (05:45 +0000)]
Revise unittest for 'LD' in 'make_global_settings'

This is a follow up CL for r1937. This is just a revise of a unittest and does not changes existing functionality.

It turned out that we need to specify GYP_CROSSCOMPILE=1 to test 'LD'/'LD.host' properly. Expected results, which are expected to be describing the current behavior, are updated accordingly.

BUG=gyp:434
TEST=unittest
R=scottmg@chromium.org

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

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

6 weeks agoRemove unused parameters from test code.
torne@chromium.org [Fri, 13 Jun 2014 09:47:03 +0000 (09:47 +0000)]
Remove unused parameters from test code.

Newer versions of the Android build system have -Wunused-params enabled
by default. Drop the many unused argc/argv parameters from test C/C++
code and also (void) a parameter in a dummy malloc function. This avoids
having to come up with a convoluted way to disable the warning flag in
every test.

BUG=gyp:433
R=thakis@chromium.org

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

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

6 weeks agoAdd unittest for 'LD' in 'make_global_settings'
yukawa@chromium.org [Fri, 13 Jun 2014 01:10:39 +0000 (01:10 +0000)]
Add unittest for 'LD' in 'make_global_settings'

This CL describes the current behavior with some unittests, before making Ninja generator aware of 'LD' in 'make_global_settings'. See gyp r1931 for the background.

BUG=gyp:434
TEST=unittest
R=scottmg@chromium.org

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

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

6 weeks agoFirst crack at adding a GYP_GENERATOR for determining various things
mark@chromium.org [Thu, 12 Jun 2014 22:52:48 +0000 (22:52 +0000)]
First crack at adding a GYP_GENERATOR for determining various things

This version reads a file to get a list of input files, then outputs
if any of the input files are contained as sources (or inputs to
actions/rules) in any targets.

R=mark@chromium.org

Patch by Scott Violet <sky@chromium.org>

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

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

6 weeks agoTeach Ninja generator about 'AR' in 'make_global_settings'
yukawa@chromium.org [Thu, 12 Jun 2014 17:35:33 +0000 (17:35 +0000)]
Teach Ninja generator about 'AR' in 'make_global_settings'

With this CL, 'AR' in 'make_global_settings' can be recognized by Ninja generator, like Make generator. This makes it easier for you to share the code among host/NaCl/NDK/Emscripten build targets.

Note that 'AR.host' is not yet supported with this CL.

BUG=gyp:434
TEST=unittest
R=scottmg@chromium.org, torne@chromium.org

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

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

6 weeks agoUse context manager to manage OS environment in tests
yukawa@chromium.org [Thu, 12 Jun 2014 13:25:40 +0000 (13:25 +0000)]
Use context manager to manage OS environment in tests

This is a follow up CL for gyp r1931, just for the code cleanup.  Inspired by Nico's gyp r1893.

BUG=gyp:434
TEST=unittest
R=scottmg@chromium.org

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

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

6 weeks agoninja win: Remove obsolete comment, and make sure cc/cxx are always overridden
scottmg@chromium.org [Wed, 11 Jun 2014 23:52:16 +0000 (23:52 +0000)]
ninja win: Remove obsolete comment, and make sure cc/cxx are always overridden

Builds on discussion in https://codereview.chromium.org/321813002/.

Make sure that cc_host and cxx_host are also set to a valid compiler,
which fixes the cflags test.

R=yukawa@chromium.org
BUG=chromium:233985

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

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

6 weeks agoOverride the user's language settings during tests
mark@chromium.org [Wed, 11 Jun 2014 13:34:24 +0000 (13:34 +0000)]
Override the user's language settings during tests

If a user's language is set to anything other than English, the output
of various tools may vary from what is expected and cause tests to
fail. This fixes several test failures for non-English users.

To reproduce the issue, run: LC_ALL=de_DE.UTF-8 ./gyptest.py -a

Patch by Joey Parrish <joeyparrish@google.com>

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

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

6 weeks agoAdd unittest for 'AR' in 'make_global_settings'
yukawa@chromium.org [Mon, 9 Jun 2014 17:11:16 +0000 (17:11 +0000)]
Add unittest for 'AR' in 'make_global_settings'

Currently sharing the code among host/NaCl/NDK/Emscripten on top of Ninja+gyp isn't so easy as it should be because not all items in 'make_global_settings' are recognized by Ninja generator (gyp:434).

On the other hand, the current test coverage of 'make_global_settings' isn't so good. Thus this CL describes the current behavior with some unittests before making Ninja generator aware of 'AR' in 'make_global_settings' like Make generator.

BUG=gyp:434
TEST=unittest
R=scottmg@chromium.org

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

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

7 weeks agoAdd option for link concurrency.
scottmg@chromium.org [Thu, 5 Jun 2014 22:32:23 +0000 (22:32 +0000)]
Add option for link concurrency.

Skia's buildbots, particularly Windows builds with LTO, are held back by the
link pool.  We'd like to play around with this number a bit.  Any problem
checking an environment variable first before doing the RAM-based calculation?

Testing: ran with and without GYP_LINK_CONCURRENCY=90, looked at build.ninja

Patch from mtklein@chromium.org.

R=scottmg@chromium.org

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

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

7 weeks agoFix msvs-ninja clean build command / target.
bungeman@chromium.org [Thu, 5 Jun 2014 18:26:16 +0000 (18:26 +0000)]
Fix msvs-ninja clean build command / target.

Currently the clean command is specified as

ninja.exe -C $(OutDir) -t clean $(ProjectName)

but _BuildCommandLineForRuleRaw sees 'clean' as a path, calling _FixPath on it.
This is not a problem for Chromium because it does not set --generator-output.
As a result fixpath_prefix is None and no adjustment is made to paths.
Skia, however, does set --generator-output, and so an attempt is made to adjust
paths with _FixPath. As a result, with Skia the msvs 'Clean' target contains

ninja.exe -C $(OutDir) -t ../../gyp/clean $(ProjectName)

This change changes the command to

ninja.exe -C $(OutDir) -tclean $(ProjectName)

which it valid for ninja, but _BuildCommandLineForRuleRaw will not _FixPath it.

BUG=skia:2439
R=sbaig1@bloomberg.net

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

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

7 weeks agogyp: use all processors instead of hard-coded 8.
mark@chromium.org [Thu, 5 Jun 2014 13:27:40 +0000 (13:27 +0000)]
gyp: use all processors instead of hard-coded 8.

Makes no difference for me but might help others because gyp can easily
keep lots of processors busy.

BUG=362075

Originally landed at r1896 and backed out at r1911. This should be safe
to land after r1913.

Patch by Daniel Bratell <bratell@opera.com>.

R=torne@chromium.org

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

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

7 weeks agoandroid: Handle inputs with spaces inside make functions.
torne@chromium.org [Wed, 4 Jun 2014 17:20:44 +0000 (17:20 +0000)]
android: Handle inputs with spaces inside make functions.

A chromium gyp rule for generating assembly offsets for libvpx/webrtc
needs to be able to refer to $(call ...) macros from the Android build
system internals in order to function, but the gyp backend currently
rejects input and output names that include spaces as a sanity check to
prevent make from misinterpreting a filename with whitespace as two
files.

Skip this check in the case where the input or output filename starts
with '$(' so that make macros are not rejected. Add two test cases: one
to check that normal filenames with spaces are forbidden, and one to
check that using a make macro as an input definitely works.

BUG=gyp:432
R=sbc@chromium.org

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

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

7 weeks agoFix msvs-ninja OutputDirectory path.
bungeman@chromium.org [Wed, 4 Jun 2014 16:07:15 +0000 (16:07 +0000)]
Fix msvs-ninja OutputDirectory path.

_FixPath is designed to take gyp paths and convert them to msvs project paths.
This translates a <gyp_dir>"<gyp_dir_to_X>" to
<msvs_project_dir>"<msvs_project_dir_to_gyp_dir>/<gyp_dir_to_X>".

The OutputDirectory when using ninja as the external builder with the ninja
generator generated build files needs to be the path
<msvs_project_dir>"<msvs_project_dir_to_ninja_build_config>".
Since this is specified on a per target basis and will be run though _FixPath,
the external builder directory in the target must be specified as
<gyp_dir>"<gyp_dir_to_toplevel_dir>/<toplevel_dir_to_ninja_build>/<config>".

Chromium currently does not see any issue as it does not set generator_output.
When generator_output is not set, _GetPathOfProject sets fix_prefix to None.
Also, Chromium appears to be using an absolute path for
msvs_external_builder_out_dir.

This is, however, affecting Skia, which sets generator_output to 'out' and
places all of its gyp files in a 'gyp' directory. As a result Skia is seeing
the OutputDirectory set to "../../gyp/out/$(Configuration)". This change fixes
this to "../../out/$(Configuration)".

R=scottmg@chromium.org

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

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

8 weeks agomsvs: Revert r1920 and add a test for excluded idl
sbaig1@bloomberg.net [Thu, 29 May 2014 19:15:27 +0000 (19:15 +0000)]
msvs: Revert r1920 and add a test for excluded idl

The test uses a "bad" idl to verify that it gets excluded from the msvs build.
If it doesn't get excluded, then the build will fail because the bad.idl is
syntactically wrong.

BUG=
R=scottmg@chromium.org

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

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

2 months agoUse relative path/dir msbuild variables to map $(InputDir) and $(InputPath)
scottmg@chromium.org [Wed, 28 May 2014 05:07:57 +0000 (05:07 +0000)]
Use relative path/dir msbuild variables to map $(InputDir) and $(InputPath)

$(InputDir) and $(InputPath) assume relative paths, but they're mapped to
%(RootDir)%(Directory) and %(FullPath) respectively. This makes gyp
generate incorrect commands for non-external rules in VS, for example:

-I ../foo/C:/bar/baz.h

(based on a generated command when building content_shell in VS)

MSBuild also provides variables for relative dir and path, so we should
use those instead to map $(InputDir) and $(InputPath).

Ran test/msvs and test/win test suites against VS2010 and VS2013, no regression.
Since VS maintains the cwd when building, using relative paths shouldn't affect
the current behavior. The only case where it might break things is if an
external script/command expects absolute paths for its arguments. I haven't
seen any instance of this while building content_shell and its dependencies.

BUG=

Patch from romain.pokrzywka@gmail.com.

R=scottmg@chromium.org

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

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

2 months agoFix for some rules not being run if their trigger is also an action dependency
scottmg@chromium.org [Tue, 27 May 2014 21:34:04 +0000 (21:34 +0000)]
Fix for some rules not being run if their trigger is also an action dependency

The issue happens with e.g. accessibility.gyp for the ax_gen target:
Because ax_enums.idl is also an action additional input, it gets added to the
excluded_sources list when gyp generates the project, so the genapi_idl rule
on ax_enums.idl is marked as excluded from the build.

Rule target files should be removed from the excluded_sources list to
allow their rule to be run.

BUG=

R=scottmg@chromium.org

Patch from romain.pokrzywka@gmail.com.

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

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

2 months agoninja win: filter 64 bit idl processing, and confirm in test
scottmg@chromium.org [Wed, 21 May 2014 20:12:49 +0000 (20:12 +0000)]
ninja win: filter 64 bit idl processing, and confirm in test

Windows x64 build otherwise emits noise like:

"
64 bit Processing ..\..\third_party\iaccessible2\ia2_api_all.idl

ia2_api_all.idl
"

Suppress that, and confirm in existing test.

R=thakis@chromium.org

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

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

2 months agoFix link step when specifying CLANG_CXX_LIBRARY
sdefresne@chromium.org [Mon, 19 May 2014 17:58:10 +0000 (17:58 +0000)]
Fix link step when specifying CLANG_CXX_LIBRARY

When using C++ library, pass the -stdlib flag to the linker so that the
correct library is linked against the binary.

The test allocate a string on the stack in order to check that the correct
library is linked. This is sufficient since libc++ and libstdc++ have an
incompatible ABI and linking fails if compilation and link does not use the
same value for -stdlib flag.

For example, if using -stdlib=libc++ when compiling and -stdlib=libstdc++
when linking the test program result in the following compilation error:

FAILED: /usr/bin/clang++ -mmacosx-version-min=10.7 -arch x86_64 -L. -o libc++ obj/libc++.libc++.o
Undefined symbols for architecture x86_64:
  "std::__1::basic_string<char, std::__1::char_traits<char>, std::__1::allocator<char> >::~basic_string()", referenced from:
      _main in libc++.libc++.o
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

BUG=gyp:425
R=thakis@chromium.org

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

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

2 months agoDon't exclude sources for 'none' targets
sbaig1@bloomberg.net [Wed, 14 May 2014 13:17:37 +0000 (13:17 +0000)]
Don't exclude sources for 'none' targets

MSVS doesn't compile files for 'none' targets, so there is no need to "exclude"
them.

BUG=
R=scottmg@chromium.org

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

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

2 months agoninja/mac: Update libtool noise filter for Xcode 5.
thakis@chromium.org [Tue, 13 May 2014 09:17:23 +0000 (09:17 +0000)]
ninja/mac: Update libtool noise filter for Xcode 5.

BUG=chromium:372716
R=senorblanco@chromium.org

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

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

2 months agoandroid: set GYP_VAR_PREFIX as a local variable in actions/rules.
torne@chromium.org [Thu, 8 May 2014 09:33:53 +0000 (09:33 +0000)]
android: set GYP_VAR_PREFIX as a local variable in actions/rules.

A few actions/rules need to be able to call the intermediates-dir-for
function from the Android build system in order to discover the location
of another target's intermediates. To do this correctly in a multilib
build we need to pass GYP_VAR_PREFIX to pick the right intermediate
location, but since the variable is not expanded until the command is
executed we need to set a rule-specific local variable for this purpose,
as otherwise it will use whichever value of GYP_VAR_PREFIX was set last
instead of the value for the current target.

This is the same pattern used for other target-specific variables such
as LOCAL_PATH.

BUG=
R=thakis@chromium.org

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

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

2 months agoRemove pylintrc and enable pylint checks for the Xcode generator.
mark@chromium.org [Tue, 6 May 2014 16:56:23 +0000 (16:56 +0000)]
Remove pylintrc and enable pylint checks for the Xcode generator.

This copy of pylintrc is never used, and its presence is confusing. The
canned pylint check uses the pylintrc in depot_tools. Project-specific
blacklisted and whitelisted files and disabled warnings are enumerated
in PRESUBMIT.py.

xcode.py is pylint-clean with the current pylint configuration, so it no
longer needs to be excluded from pylint checks.

TEST=presubmit
R=thakis@chromium.org

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

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

2 months agoPrefer MSVS 2013 over MSVS 2010
sbaig1@bloomberg.net [Tue, 6 May 2014 16:52:11 +0000 (16:52 +0000)]
Prefer MSVS 2013 over MSVS 2010

BUG=
R=scottmg@chromium.org

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

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

2 months agoSilence pylint for the imported OrderedSet class.
mark@chromium.org [Tue, 6 May 2014 16:39:25 +0000 (16:39 +0000)]
Silence pylint for the imported OrderedSet class.

Silence two warnings:
OrderedSet.discard: Redefining built-in 'next'
OrderedSet.pop: Arguments number differs from overridden method

Patch by Daniel Bratell <bratell@opera.com>

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

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

2 months agoAdd xcode_ninja_target_pattern to xcode-ninja generator
justincohen@chromium.org [Tue, 6 May 2014 16:21:14 +0000 (16:21 +0000)]
Add xcode_ninja_target_pattern to xcode-ninja generator

Adds new GYP_GENERATOR_FLAG xcode_ninja_target_pattern. This
customization allows for non-executable targets in the xcode_ninja wrapper.

Also changes the name of xcode_ninja_target_filter to
xcode_ninja_executable_target_pattern.

xcode_ninja_executable_target_pattern (default all)
  - Restrict executable targets to this pattern, if set.
xcode_ninja_target_pattern (default none)
  - Include extra targets, such as non-executable targets based on this pattern, if set.

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

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

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

2 months agoMake the command cache use the directory name as part of the cache key.
mark@chromium.org [Mon, 5 May 2014 16:23:40 +0000 (16:23 +0000)]
Make the command cache use the directory name as part of the cache key.

Some commands are sensitive to the directory they're executed from. Chrome's
Mojo is trying to use such a command.

This makes GYP about 10% slower on my Mac laptop when running on Chrome, which
is to say that it's not actually noticeably worse, because it was already so
bad.  Out of 2,413 command executions, there were formerly 475 cache misses;
this change adds another 1,596. I looked at the sorts of commands that are now
missing and the majority of them (879) are dir_exists.py followed by a
relative path, and those expansions are very incorrect to look up from the
cache. The next biggest buckets are 252 "echo -n ${HOME}/goma", 220
find_sdk.py, and another 220 plugin_flags.sh with an absolute directory
argument, and none of these are sensitive to the working directory. Finally,
there are 9 version.py invocations that are sensitive to the working
directory. The numbers don't add up because I examined different statistics
during different runs, and parallelism means that caching behavior is slightly
different on successive runs.

Considering that over half of the existing cache hits are dangerous, I'm
inclined to make this change from a correctness perspective over performance
concerns. Meanwhile, we should find a way to limit the time impact of the big
callees here. dir_exists.py, find_sdk.py, plugin_flags.sh, and the goma finder
might all perform better if migrated to pymod_do_main.

BUG=112,418
TEST=gyptest.py test/variables/commands/gyptest-commands-repeated-multidir.py

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

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

2 months agoAppend src path to compiler path retrieved from build configuration.
thakis@chromium.org [Fri, 2 May 2014 17:45:16 +0000 (17:45 +0000)]
Append src path to compiler path retrieved from build configuration.

BUG=chromium:369487
TEST=./build/gyp_chromium succeeds in detecting include paths for eclipse generator on chromeos,linux using built in clang.

Review URL: https://codereview.chromium.org/261063005/
Patch from Robert Flack <flackr@chromium.org>!

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

2 months agoRevert "gyp: use all processors instead of hard-coded 8."
torne@chromium.org [Fri, 2 May 2014 12:24:19 +0000 (12:24 +0000)]
Revert "gyp: use all processors instead of hard-coded 8."

This reverts commit 56a70c5641bbb01683dfeb7aa8a65800a00fb936.

The change made bug 112 trigger on a trybot since we used
fewer processes, making bug 112 easier to trigger. The
value of this patch is not big enough to fuss around.

BUG=
R=torne@chromium.org

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

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

2 months agoandroid: only emit multilib variables for target builds.
torne@chromium.org [Wed, 30 Apr 2014 16:08:53 +0000 (16:08 +0000)]
android: only emit multilib variables for target builds.

Host modules shouldn't set LOCAL_MODULE_TARGET_ARCH or other multilib
build related variables, and shouldn't use multilib intermediate
directories. This wasn't breaking anything as it was a no-op, but
upcoming android build system changes will cause this to do the wrong
thing.

BUG=
R=thakis@chromium.org

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

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

2 months agogyp: Optimize IsStrCanonicalNumber for common case
scottmg@chromium.org [Mon, 28 Apr 2014 16:37:32 +0000 (16:37 +0000)]
gyp: Optimize IsStrCanonicalNumber for common case

IsStrCanonicalNumber is called on everything in a gyp file
and for a build system the size of chromium that meant spending
about 2 CPU seconds in it. By hand optimizing the execution of
the common case (which is not a number) that can be cut do less
than 1 CPU second.

The save of 1 CPU second (3%) translates to roughly 0.2s execution
time (0.6%) with 8 cores. YMMV

Patch from bratell@opera.com.

BUG=362075
R=scottmg@chromium.org

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

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

2 months ago1-5% faster gyp: Use a simpler deepcopy.
scottmg@chromium.org [Mon, 28 Apr 2014 16:35:02 +0000 (16:35 +0000)]
1-5% faster gyp: Use a simpler deepcopy.

The system deepcopy supports recursive objects or non-tree structures.
Those structures don't exist in gyp so save 2-3 seconds
CPU time (0.3-1s clock time with 8 cores) by using a simpler
implementation.

Patch from bratell@opera.com.

BUG=362075
R=scottmg@chromium.org

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

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

2 months agoTest handling of empty RULE_INPUT_DIRNAME and fix this on android.
torne@chromium.org [Mon, 28 Apr 2014 09:20:35 +0000 (09:20 +0000)]
Test handling of empty RULE_INPUT_DIRNAME and fix this on android.

1) Add test coverage for RULE_INPUT_DIRNAME being empty to the
rules-dirname test by adding a new input file in the same directory as
the gyp file.

2) Enable the test on the android backend; to make this easy, drop use
of iostream in the test code since the STL is not in Android's default
include path and just use stdio instead.

3) Fix the android generator to normalise paths correctly so that this
case works.

Unfortunately, MSVC does not handle an empty RULE_INPUT_DIRNAME and there's
no obvious way to fix it, so this will have to remain unsupported there.

BUG=
R=thakis@chromium.org

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

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

3 months agogyp performance: Another fixed O(n^2) in dependency calcs.
thakis@chromium.org [Fri, 25 Apr 2014 22:37:29 +0000 (22:37 +0000)]
gyp performance: Another fixed O(n^2) in dependency calcs.

Save some time by avoiding "x in list" operations in the dependency
calculations. In a project the size of chromium this code uses about
0.4 seconds before the patch and around 0.23 seconds after the patch.

The patch is the same as in some other changes, to combine the list with
a set() for the "x in list" lookups.

BUG=362075

Review URL: https://codereview.chromium.org/240013003/
Patch from Daniel Bratell <bratell@opera.com>!

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

3 months agogyp: isinstance -> type for another 1-5% save.
thakis@chromium.org [Fri, 25 Apr 2014 22:36:35 +0000 (22:36 +0000)]
gyp: isinstance -> type for another 1-5% save.

isinstance is crazily slow. Save another 3 CPU seconds (<1 real second
with 8 cores) by using type() instead. This works well since we know
exactly what types we are using.

There are still some isinstance around, but only in cold paths where
performance doesn't matter.

BUG=362075

Review URL: https://codereview.chromium.org/232023006/
Patch from Daniel Bratell <bratell@opera.com>!

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

3 months agogyp: avoid copying items that will be deleted.
thakis@chromium.org [Fri, 25 Apr 2014 22:35:25 +0000 (22:35 +0000)]
gyp: avoid copying items that will be deleted.

We spent a few CPU seconds copying items we deleted a few lines further
down. Seems a bit wasteful. This saves around 0.5 real world seconds for
me.

BUG=362075
R=mark@chromium.org

Review URL: https://codereview.chromium.org/233503002/
Patch from Daniel Bratell <bratell@opera.com>

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

3 months agoShow ASM output file instead of input file, just like CC and CXX.
scottmg@chromium.org [Fri, 25 Apr 2014 20:26:51 +0000 (20:26 +0000)]
Show ASM output file instead of input file, just like CC and CXX.
R=scottmg@chromium.org

Patch by wtc@chromium.org.

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

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

3 months agowin: disable two flaky tests on gyp-win32
scottmg@chromium.org [Wed, 23 Apr 2014 17:54:33 +0000 (17:54 +0000)]
win: disable two flaky tests on gyp-win32

After much investigation (linked bug and earlier ps), I don't
really know much other than that these tests are failing when
the toolchain emits:

"LINK : unable to load ILK file; performing full link"

I haven't been able to figure out why that's happening though, so
I'm going to disable these two tests on x86 hosts so that the bots
aren't red.

I'm also going to add the diagnostic flag to the chromium build to
see if we can diagnose any unexpected incremental link failures.

R=thakis@chromium.org
BUG=365833 and https://groups.google.com/d/topic/gyp-developer/gKRi0DB-DWw/discussion

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

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

3 months agoRemove the default setting for clcompile_cmd in msvs-ninja
sbaig1@bloomberg.net [Wed, 23 Apr 2014 14:31:47 +0000 (14:31 +0000)]
Remove the default setting for clcompile_cmd in msvs-ninja

The 'msvs_external_builder_clcompile_cmd' logic is preserved, this commit
simply removes the default setting.  It can be restored by individual
developers based on personal preference.

BUG=352876
R=scottmg@chromium.org

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

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

3 months agogyp: cache conditional ASTs for 3 CPU seconds (5%) gain.
thakis@chromium.org [Wed, 16 Apr 2014 15:37:31 +0000 (15:37 +0000)]
gyp: cache conditional ASTs for 3 CPU seconds (5%) gain.

This is in the parallel part so net gain is somewhere between
5/core_count% and 5%. In chromium on my computer I save roughly
1.5 seconds in total runtime.

BUG=chromium:362075
R=mark@chromium.org

Review URL: https://codereview.chromium.org/232773004/
Patch from Daniel Bratell <bratell@opera.com>!

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

3 months agogyp: use a set() in DeepDependencies for less O(n^2).
thakis@chromium.org [Wed, 16 Apr 2014 15:35:52 +0000 (15:35 +0000)]
gyp: use a set() in DeepDependencies for less O(n^2).

Another O(n^2) over the number of targets which used about half a second
for a 1000 target system (chromium) on a reasonable computer.

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

Review URL: https://codereview.chromium.org/235193002/
Patch from Daniel Bratell <bratell@opera.com>!

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

3 months agogyp: fix O(n^2) in dependency calculations.
thakis@chromium.org [Wed, 16 Apr 2014 15:34:25 +0000 (15:34 +0000)]
gyp: fix O(n^2) in dependency calculations.

With 1000 targets an O(n^2) in the dependency management starts to be
noticed. This patch takes a 0.2s function to 0.02s. The function is not
parallelized so this is a true 1% speedup.

Also commented on another *potential* performance problem with very
specific dependency graphs.

BUG=362075
R=scottmg@chromium.org

Review URL: https://codereview.chromium.org/234813003/
Patch from Daniel Bratell <bratell@opera.com>!

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

3 months agogyp: 1% faster by optimizing IsPathSections
thakis@chromium.org [Wed, 16 Apr 2014 15:32:59 +0000 (15:32 +0000)]
gyp: 1% faster by optimizing IsPathSections

IsPathSection is 2-3% of the execution time for chromium. Hand optimize
it a bit to make it twice as fast for a total gain of 0.5 CPU seconds.

BUG=chromium:362075
R=scottmg@chromium.org

https://codereview.chromium.org/233483002/
Patch from Daniel Bratell <bratell@opera.com>!

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

3 months agogyp: use all processors instead of hard-coded 8.
thakis@chromium.org [Wed, 16 Apr 2014 15:30:14 +0000 (15:30 +0000)]
gyp: use all processors instead of hard-coded 8.

Makes no difference for me but might help others because gyp can easily
keep lots of processors busy.

BUG=362075
R=scottmg@chromium.org
Review URL: https://codereview.chromium.org/232783007/

Patch from Daniel Bratell <bratell@opera.com>!

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

3 months agoMake test/cxxflags use a user define instead of __OPTIMIZE__
scottmg@chromium.org [Mon, 14 Apr 2014 16:30:08 +0000 (16:30 +0000)]
Make test/cxxflags use a user define instead of __OPTIMIZE__

__OPTIMIZE__ is a gcc-specific define, so this was broken on Windows
after https://code.google.com/p/gyp/source/detail?r=1893.

R=thakis@chromium.org

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

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

3 months agoAdd MASM settings support to msvs_settings.
scottmg@chromium.org [Thu, 10 Apr 2014 23:36:28 +0000 (23:36 +0000)]
Add MASM settings support to msvs_settings.

The 'UseSafeExceptionHandlers' setting, if set to 'true', passes the
/safeseh option to ml.exe.

Without it, linking fails with error messages like this:

[182/259] LINK_EMBED(DLL) crnss.dll
FAILED: C:\python_27_amd64\files\python.exe gyp-win-tool link-with-manifests env
ironment.x86 True crnss.dll "C:\python_27_amd64\files\python.exe gyp-win-tool li
nk-wrapper environment.x86 False link.exe /nologo /IMPLIB:crnss.dll.lib /DLL /OU
T:crnss.dll @crnss.dll.rsp" 2 mt.exe rc.exe "obj\third_party\nss\nss.crnss.dll.i
ntermediate.manifest" obj\third_party\nss\nss.crnss.dll.generated.manifest
nss_static.lib(nss_static.intel-aes-x86-masm_asm.obj) : error LNK2026: module un
safe for SAFESEH image.
nss_static.lib(nss_static.intel-gcm-x86-masm_asm.obj) : error LNK2026: module un
safe for SAFESEH image.
crnss.dll : fatal error LNK1281: Unable to generate SAFESEH image.

Add the ImageHasSafeExceptionHandlers setting support for VCLinkerTool. If set
to 'true', it is mapped to the /SAFESEH linker option.

R=scottmg@chromium.org
BUG=none

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

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

3 months agoUse context manager to manage OS environment in tests
thakis@chromium.org [Thu, 10 Apr 2014 21:47:22 +0000 (21:47 +0000)]
Use context manager to manage OS environment in tests

Currently tests use manual context management (try: ... finally: ...)
This is cleaner and more robust with a context manager:
https://docs.python.org/2/library/contextlib.html

Also fixes some bugs and typos.

Tests are:
test/cflags/gyptest-cflags.py (make + ninja)
test/cxxflags/gyptest-cxxflags.py (ninja)

R=thakis
TEST=PYTHONPATH=$CHROMIUM_DIR/tools/gyp/test/lib TESTGYP_FORMAT=make test/cflags/gyptest-cflags.py
TEST=PYTHONPATH=$CHROMIUM_DIR/tools/gyp/test/lib TESTGYP_FORMAT=ninja test/cflags/gyptest-cflags.py
TEST=PYTHONPATH=$CHROMIUM_DIR/tools/gyp/test/lib TESTGYP_FORMAT=ninja test/cxxflags/gyptest-cxxflags.py

Review URL: https://codereview.chromium.org/228323002/
Patch from Nils Barth <nbarth@chromium.org>!

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

3 months agoRevert "Fix None target type with Ninja build."
torne@chromium.org [Wed, 9 Apr 2014 11:30:31 +0000 (11:30 +0000)]
Revert "Fix None target type with Ninja build."

This reverts r1883, which seems to be causing gyp-win32 bot failures on
test\ninja\solibs_avoid_relinking\gyptest-solibs-avoid-relinking.py and
test\win\gyptest-link-restat-importlib.py.

BUG=
TBR=etienneb@chromium.org,scottmg@chromium.org

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

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

3 months agoAvoid duplicating non-configuration settings when merging configurations
jochen@chromium.org [Tue, 8 Apr 2014 20:36:41 +0000 (20:36 +0000)]
Avoid duplicating non-configuration settings when merging configurations

When one configuration inherits from another, we should merge the
configurations before merging the default settings into the configuration.
Otherwise, the more concrete configuration will end up with all default
settings twice

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

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

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

3 months agoAdds xcode-ninja flavor for Xcode wrapper projects.
justincohen@chromium.org [Tue, 8 Apr 2014 13:42:35 +0000 (13:42 +0000)]
Adds xcode-ninja flavor for Xcode wrapper projects.

Xcode has great development and debugging tools, but runs slowly with very
large projects.  Ninja does processes build files very quickly.  This -ninja
flavor bridges the gap by building each executable target with ninja, while
loading all the sources and bundle resources into an Xcode project.

Adds three new generator_flags:
 - xcode_ninja_main_gyp: Path to main wrapper workspace.  Otherwise the main
    gyp path will be used with .ninja prepended to the extension.
 - xcode_ninja_target_filter: Regex filter to remove some targets.  Removing
    rarely used seems to make Xcode much faster.
 - xcode_ninja_jobs: Number of jobs to pass to ninja, defaults to 0.

BUG=
TEST=
R=mark@chromium.org, sdefresne@chromium.org

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

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

3 months agoandroid: Add support for multiarch builds.
torne@chromium.org [Tue, 8 Apr 2014 11:07:03 +0000 (11:07 +0000)]
android: Add support for multiarch builds.

The android build system supports 32/64 bit multiarch builds; add
support for this in the android gyp backend. This requires that you run
gyp twice to generate one complete set of makefiles for each
architecture, and then include both into your toplevel Android.mk with
code like:

GYP_VAR_PREFIX :=
include GypAndroid.$(TARGET_ARCH).mk
GYP_VAR_PREFIX := $(TARGET_2ND_ARCH_VAR_PREFIX)
include GypAndroid.$(TARGET_2ND_ARCH).mk

Changes made in this CL:

1) Set GYP_VAR_PREFIX to the empty string by default (which indicates
building for the primary architecture), to maintain compatibility with
non-multiarch builds.

2) Set LOCAL_MODULE_TARGET_ARCH to indicate that we should only build
the current module for whichever architecture is indicated by
GYP_VAR_PREFIX. This will take effect for target static and dynamic
libraries, and for executables.

3) Set LOCAL_2ND_ARCH_VAR_PREFIX when including base_rules.mk directly
for "none" type targets, since the processing logic for
LOCAL_MODULE_TARGET_ARCH isn't applied by the build system in this case.

3) Pass GYP_VAR_PREFIX when calling local-intermediates-dir or
intermediates-dir-for, and use it when referring to
TARGET_OUT_INTERMEDIATE_LIBARIES, so that we get the correct
intermediate directories.

4) Rename all host targets to include the current target architecture,
so that they will be built separately once per target. Not all host
targets actually need to be built twice, but we can't easily tell which
do. There aren't many in total, so this shouldn't be too expensive.

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

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

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

3 months agoandroid: Allow disabling the generation of alias targets.
torne@chromium.org [Wed, 2 Apr 2014 17:56:04 +0000 (17:56 +0000)]
android: Allow disabling the generation of alias targets.

The android backend mangles the names of targets in its output in order
to ensure they don't clash with each other or with existing Android
build system targets, since they are required to be unique. It also
generates aliases referring to their original names as given in the gyp
input, for usability and test purposes, but this can cause namespace
issues. Add a generator option allowing the generation of these aliases
to be disabled, which will also disable generation of the
"gyp_all_modules".

BUG=gyp:341
R=thakis@chromium.org

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

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

3 months agoandroid: Remove rule_trigger targets.
torne@chromium.org [Wed, 2 Apr 2014 17:36:53 +0000 (17:36 +0000)]
android: Remove rule_trigger targets.

The rule_trigger target doesn't serve any useful purpose since all the
output files from the rule are added to extra_outputs, which is already
depended on by the final target. It causes problems when trying to do a
multiarch build since the same rule trigger target name is calculated
for both architectures, so remove it.

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

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

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

4 months agoImplements ARCHS filtering for all generator on OS X
sdefresne@chromium.org [Wed, 26 Mar 2014 14:36:43 +0000 (14:36 +0000)]
Implements ARCHS filtering for all generator on OS X

Implements ARCHS filtering by VALID_ARCHS and variable expansion, like
$(ARCHS_STANDARD), in XcodeSettings.GetActiveArchs so it is available
for all generators and all SDKROOT (macosx, iphoneos, iphonesimulator)
instead of being restricted to iOS projects.

BUG=None
R=mark@chromium.org

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

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

4 months agoFix None target type with Ninja build.
scottmg@chromium.org [Tue, 25 Mar 2014 01:00:04 +0000 (01:00 +0000)]
Fix None target type with Ninja build.

GYP doesn't produce a valid Ninja rule for 'none' target type.
These targets are used to make fake dependencies.

Here is a minimal GYP file to show the issue:

{
  'targets': [
    {
      'target_name': 'dummy',
      'type': 'none',
      'sources': [
        'test.h',
      ],
    },
  ],
}

There is a dummy.ninja file, but there is no rules named 'dummy'.
When using the 'msvs-ninja' build, MSVS complains about a missing target
and fails to compile the project.

Patch from etienneb@chromium.org.

BUG=
R=scottmg@chromium.org

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

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

4 months agoEnable 64-bit architectures by default for Xcode 5.1 and higher
sdefresne@chromium.org [Mon, 24 Mar 2014 13:37:20 +0000 (13:37 +0000)]
Enable 64-bit architectures by default for Xcode 5.1 and higher

According to Xcode 5.1 release notes, the "Standard Architectures" build
settings now also include 64-bit architecture, while the build settings
"Standard Architectures Including 64-Bit" is no deprecated.

BUG=gyp:412
R=mark@chromium.org

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

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

4 months agoFix ARCHS selection when building for iOS
sdefresne@chromium.org [Fri, 21 Mar 2014 14:52:18 +0000 (14:52 +0000)]
Fix ARCHS selection when building for iOS

When building for iOS, consider any architecture set in the gyp files
as valid (to allow building for x86_64 when using Xcode 4.0 or higher).

BUG=webrtc:3073
R=thakis@chromium.org

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

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

4 months agoninja: Reduce size of individual_generated_bindings by another 45kB / 15%.
thakis@chromium.org [Thu, 20 Mar 2014 19:21:54 +0000 (19:21 +0000)]
ninja: Reduce size of individual_generated_bindings by another 45kB / 15%.

1. Only write unique_name for rules on Windows, it's unused elsewhere.
Makes individual_generated_bindings.ninja another 30kB / 10% smaller.

2. Don't include the hash in the rule name: It's not needed since the stamp
file has a qualified path. Saves another 14kB.

BUG=350317
R=scottmg@chromium.org

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

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

4 months agoninja: Collapse rule inputs into a single node when it makes sense.
thakis@chromium.org [Thu, 20 Mar 2014 09:57:01 +0000 (09:57 +0000)]
ninja: Collapse rule inputs into a single node when it makes sense.

Before this CL, if a rule matched N source files and had M inputs, the inputs
where repeated for every build edge, hence showing up N * M times in the
generated ninja file.

After this, gyp instead writes a single stamp node depending on all the inputs
and makes every source rule edge depend on this stamp file, reducing the number
of times they show up in the generated ninja file to N + M. (Also bake
order-only deps into this new node.)

No behavior change. Reduces the size of individual_generated_bindings.ninja
from 4.5MB to 401kB, and the size of all generated ninja files in chromium
from 15.1MB to 10.9MB. This in turn speeds up empty builds by 60ms on my
SSD laptop and by probably over 0.1s on my HDD desktop (didn't try that due
to lack of travel desktop though).

BUG=chromium:350317
R=scottmg@chromium.org

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

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

4 months agoSupport building selected C/C++ files in msvs-ninja
sbaig1@bloomberg.net [Wed, 19 Mar 2014 14:52:56 +0000 (14:52 +0000)]
Support building selected C/C++ files in msvs-ninja

This commits adds a new 'msvs_external_builder_clcompile_cmd' property, which
will be used when the user tries building selected C/C++ files.

For msvs-ninja, the 'msvs_external_builder_clcompile_cmd' will be mapped to a
new 'ExecClCompile' command in gyp-win-tool, which will expand the list of
selected files into a list of ninja targets and then invoke ninja.

BUG=352876
R=scottmg@chromium.org

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

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

4 months agoninja: Don't support RULE_INPUT_* variables in rule inputs.
thakis@chromium.org [Tue, 18 Mar 2014 16:08:58 +0000 (16:08 +0000)]
ninja: Don't support RULE_INPUT_* variables in rule inputs.

https://code.google.com/p/gyp/wiki/GypLanguageSpecification#Rules doesn't say
that it's available in inputs, and as of r257511 it's not used in inputs
in chromium.

(RULE_INPUT_PATH is always implicitly an input for a rule. Some windows test
files explicitly added it too; fix them.)

BUG=chromium:350317
R=scottmg@chromium.org

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

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

4 months agomsvs_emulation: Remove unused method.
thakis@chromium.org [Mon, 17 Mar 2014 18:02:11 +0000 (18:02 +0000)]
msvs_emulation: Remove unused method.

R=scottmg@chromium.org

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

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

4 months agoOn some source control systems (perforce), checked out files are by default readonly...
dimator@google.com [Sun, 16 Mar 2014 21:42:05 +0000 (21:42 +0000)]
On some source control systems (perforce), checked out files are by default readonly (unlike git, subversion, etc.)

Using win-tool to do a recursive copy is failing on such systems, because for example, if I had a 'copies' clause in my gyp that put stuff from my source tree into my output directory, it would copy them fine the first time, but it would leave them with the initial file modes: read only.

This means that subsequent attempts at copying the files would result in permission errors. Python's os.unlink() (and shtuil.rmtree) are pretty passive when it comes to read-only files, they raise an exception right away.

Note that under CMD, the command "COPY from to" would prompt to force copy these files to be copied. "COPY /Y from to" would force the copy. Under cygwin, "cp -af from to" would of course work as expected.

The comment in ExecRecursiveMirror says that it should emulate "rm -rf out and cp -af in out", which, as it stands currently, is not exactly true. This change helps to make this routine closer to what it's supposed to be.

BUG=
R=scottmg@chromium.org

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

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

4 months agoninja/mac: Fix multiarch link regression caused by 1871.
thakis@chromium.org [Sat, 15 Mar 2014 00:05:21 +0000 (00:05 +0000)]
ninja/mac: Fix multiarch link regression caused by 1871.

The bug was caused by i386 and x86_64 binary using the same rsp file.
Add arch to rsp filename in multi-arch builds.

(ld64 prints a warning about .o files not having the right arch when linking
the 64bit version using the rsp file written for the 32bit link and the other
way round and silently skips the .o file, but it exits with 0. To test for this,
get symbols from the final fat binary in each arch and check that they are all
there -- this fails fairly reliably without the patch, even though it depends
on process invocation order.)

BUG=chromium:352816
TBR=scottmg@chromium.org (lg'd at https://codereview.chromium.org/200943003/)

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

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

4 months agowin: make msvs_shard work properly for static_library references
scottmg@chromium.org [Fri, 14 Mar 2014 17:38:01 +0000 (17:38 +0000)]
win: make msvs_shard work properly for static_library references

Before this, dependencies inside a static_library weren't updated to
reference the _N targets, necessitating workarounds like
https://src.chromium.org/viewvc/chrome?revision=254345&view=revision .

The 'refs_to_shard_external_lib' target fails before this change.

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

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

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

4 months agoninja: Revert accidental windows changes in r1871.
thakis@chromium.org [Thu, 13 Mar 2014 03:52:48 +0000 (03:52 +0000)]
ninja: Revert accidental windows changes in r1871.

TBR=scottmg@chromium.org

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

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

4 months agoninja: Use rsp files for SOLINK and SOLINK(module) on linux and mac.
thakis@chromium.org [Thu, 13 Mar 2014 03:47:47 +0000 (03:47 +0000)]
ninja: Use rsp files for SOLINK and SOLINK(module) on linux and mac.

To support link lines longer than 128 kiB == 131072 bytes, like it's
needed for chromium's content library.

R=scottmg@chromium.org

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

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

4 months agoFix missing variable MSVS expansion of copies arguments with Ninja.
scottmg@chromium.org [Wed, 12 Mar 2014 21:58:41 +0000 (21:58 +0000)]
Fix missing variable MSVS expansion of copies arguments with Ninja.

The Visual Studio emulation does not expand the special
variables like 'VSInstallDir' into the 'copies' actions.

Here is a small broken example:

{
  'targets': [
    {
      'target_name': 'Copy_Target',
      'type': 'none',
      'copies': [
        {
          'destination': '<(PRODUCT_DIR)',
          'files': [
            '$(VSInstallDir)\\bin\\cl.exe',
          ],
        },
      ],
    },
  ],
}

Patch from etienneb@chromium.org.

R=scottmg@chromium.org

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

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

4 months agoFix test/mac/gyptest-strip.py with Xcode 5.0 or higher
sdefresne@chromium.org [Wed, 12 Mar 2014 13:47:25 +0000 (13:47 +0000)]
Fix test/mac/gyptest-strip.py with Xcode 5.0 or higher

The version of clang that ships with Xcode 5.0 and higher add an extra
symbol if the command-line use a relative path with more than one
component to reference the source file (like ./file.c). This extra
symbol is not present if using an absolute path to the file, and cause
a difference of behaviour between xcodebuild and ninja.

Account for the extra symbol in the un-stripped binaries when building
with ninja and using Xcode 5.0 or higher. A possible alternative would
be to always use absolute path with ninja, but it would make the build
environment non-relocatable.

BUG=gyp:381
R=mark@chromium.org

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

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

4 months agoDisable test/mac/gyptest-objc-gc.py when using Xcode 5.1
sdefresne@chromium.org [Wed, 12 Mar 2014 13:40:21 +0000 (13:40 +0000)]
Disable test/mac/gyptest-objc-gc.py when using Xcode 5.1

Xcode 5.1 removed support for garbage collection, and no longer recognize
the GCC_ENABLE_OBJC_GC settings, so disable the corresponding test.

BUG=gyp:414
R=mark@chromium.org

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

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

4 months agoIntroduce a helper module TestMac
sdefresne@chromium.org [Wed, 12 Mar 2014 08:48:14 +0000 (08:48 +0000)]
Introduce a helper module TestMac

Many tests have to check the version of Xcode (as new versions introduce
incompatibilities) so introduce a module TestMac with a singleton object
to help get information about Xcode via xcodebuild.

Move binary architecture introspection into the TestMac module as this
is shared between Mac OS X and iOS unit tests.

BUG=gyp:414
R=mark@chromium.org

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

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

4 months agoDisable gyptest-link-dependency.py for cmake, make it pass with ninja/win
thakis@chromium.org [Tue, 11 Mar 2014 18:45:17 +0000 (18:45 +0000)]
Disable gyptest-link-dependency.py for cmake, make it pass with ninja/win

See https://codereview.chromium.org/177043010/#msg15 for the cmake bit, and
the following comments for ninja/win.

R=scottmg@chromium.org
TBR=scottmg@chromium.org

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

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

4 months agoAdd support for VCCLCompilerTool EnableEnhancedInstructionSet setting.
grt@chromium.org [Tue, 11 Mar 2014 18:27:07 +0000 (18:27 +0000)]
Add support for VCCLCompilerTool EnableEnhancedInstructionSet setting.

R=scottmg@chromium.org

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

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

4 months agoRemove explicit usage of sh to launch test_check_sdkroot.sh
sdefresne@chromium.org [Mon, 10 Mar 2014 14:02:16 +0000 (14:02 +0000)]
Remove explicit usage of sh to launch test_check_sdkroot.sh

The property svn:executable has been set on the test_check_sdkroot.sh script
so remove the workaround that was introduced to have tests pass when the
property was not set.

BUG=None
R=mark@chromium.org

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

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

4 months agoFix gyptest-type-envvars.py for Xcode 5.0.0
sdefresne@chromium.org [Sun, 9 Mar 2014 17:29:56 +0000 (17:29 +0000)]
Fix gyptest-type-envvars.py for Xcode 5.0.0

With Xcode 5.0.0, the SDKROOT environment variable is always set
when building, even if not set in the Xcode project.

BUG=381
R=mark@chromium.org

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

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

4 months agoRemove unused parameter. No functionality change.
thakis@chromium.org [Fri, 7 Mar 2014 22:28:44 +0000 (22:28 +0000)]
Remove unused parameter. No functionality change.

R=scottmg@chromium.org

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

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

4 months agoAllow support target name suffix to be customized
mark@chromium.org [Tue, 4 Mar 2014 22:55:23 +0000 (22:55 +0000)]
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

4 months agoIntroduce the 'link_dependency' attribute that removes the targets having this
mark@chromium.org [Tue, 4 Mar 2014 15:25:00 +0000 (15:25 +0000)]
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

4 months agoClean up the filters in the MSVS generator, for VS >= 2010
scottmg@chromium.org [Thu, 27 Feb 2014 21:55:20 +0000 (21:55 +0000)]
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

4 months agoGlobally ignore '*_excluded' keys for MSVS Settings
scottmg@chromium.org [Thu, 27 Feb 2014 19:38:40 +0000 (19:38 +0000)]
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

5 months agoandroid: set ASFLAGS as well as CFLAGS.
torne@chromium.org [Fri, 21 Feb 2014 18:13:16 +0000 (18:13 +0000)]
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

5 months agoVS 2013 emits a warning when two source files have the same
scottmg@chromium.org [Thu, 20 Feb 2014 19:25:41 +0000 (19:25 +0000)]
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

5 months agoFix a local rule reference
sdefresne@chromium.org [Tue, 18 Feb 2014 17:44:32 +0000 (17:44 +0000)]
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

5 months agoCache Xcode version at the module level
sdefresne@chromium.org [Tue, 18 Feb 2014 17:29:24 +0000 (17:29 +0000)]
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

5 months agoninja: Let TOC code use $lib instead of ${lib}.
thakis@chromium.org [Mon, 17 Feb 2014 23:02:11 +0000 (23:02 +0000)]
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