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