GTTF: Print much better error message for dependency cycles.

Example:

gyp: Cycles in .gyp file dependency graph detected:
Cycle: build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp
Cycle: build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp -> build/linux/system.gyp
Cycle: base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp -> base/base.gyp
Cycle: build/linux/system.gyp -> base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp
Cycle: base/base.gyp -> build/linux/system.gyp -> base/base.gyp
Cycle: base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp
Cycle: base/base.gyp -> build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp
Cycle: build/linux/system.gyp -> base/base.gyp -> build/linux/system.gyp

BUG=chromium:35878

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


git-svn-id: http://gyp.googlecode.com/svn/trunk@1695 78cadc50-ecff-11dd-a971-7dbc132099af
Back out r1695 because it caused GYP bot test failures:

http://build.chromium.org/p/tryserver.nacl/builders/gyp-linux/builds/1119

assertItemsEqual is new in Python 2.7:

http://docs.python.org/2/library/unittest.html#unittest.TestCase.assertItemsEqual


git-svn-id: http://gyp.googlecode.com/svn/trunk@1696 78cadc50-ecff-11dd-a971-7dbc132099af
ninja/win: Set /O2 compiler flag by default if no 'Optimization' specified

Follows behavior when using MSVS generators. If target ends up with no
'Optimization' option specified, MSVS generator will not add <Optimization>
element in the <ClCompile> parent. Visual Studio will still set /O2 compile
flag though.

Tested only in VS2012 Express.

BUG=https://code.google.com/p/gyp/issues/detail?id=361
R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1697 78cadc50-ecff-11dd-a971-7dbc132099af
Rework the cflags test so it works cross platform.

Rather than using optimization flags to test cflags,
use our own explicit defined flag.  This is better than
depending on __OPTIMIZE__.

R=phajdan.jr@chromium.org, scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1698 78cadc50-ecff-11dd-a971-7dbc132099af
Ninja on mac and win should also read CFLAGS/CXXFLAGS.

Enable the code on Win/Mac as well as Linux.

R=scottmg@chromium.org

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

git-svn-id: http://gyp.googlecode.com/svn/trunk@1699 78cadc50-ecff-11dd-a971-7dbc132099af
GTTF: Print much better error message for dependency cycles.

Example:

gyp: Cycles in .gyp file dependency graph detected:
Cycle: build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp
Cycle: build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp -> build/linux/system.gyp
Cycle: base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp -> base/base.gyp
Cycle: build/linux/system.gyp -> base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp
Cycle: base/base.gyp -> build/linux/system.gyp -> base/base.gyp
Cycle: base/base.gyp -> tools/xdisplaycheck/xdisplaycheck.gyp -> build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp
Cycle: base/base.gyp -> build/linux/system.gyp -> third_party/zlib/zlib.gyp -> base/base.gyp
Cycle: build/linux/system.gyp -> base/base.gyp -> build/linux/system.gyp

BUG=chromium:35878

Patch by Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Take 2, originally landed in r1695 and backed out in r1696.
Review URL: https://codereview.chromium.org/23018008/


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