summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndroid Chromium Automerger <chromium-automerger@android>2014-05-20 15:41:21 +0000
committerAndroid Chromium Automerger <chromium-automerger@android>2014-05-20 15:41:21 +0000
commit12fc9e9c1b483568b72ed83628097dcbe3aa6684 (patch)
treea4df48687a2f24a626068c44c2277ccb50c389fb
parentb96052e691858fb65051f6e51647076f577b8911 (diff)
parent3efe68d8cf67fbdabe3ea719bbfbc3b59181c642 (diff)
downloadgyp-12fc9e9c1b483568b72ed83628097dcbe3aa6684.tar.gz
Merge tools/gyp from https://chromium.googlesource.com/external/gyp.git at 3efe68d8cf67fbdabe3ea719bbfbc3b59181c642
This commit was generated by merge_from_chromium.py. Change-Id: I27cd711a7aa2e2296d0617767355a44af44202db
-rw-r--r--pylib/gyp/generator/msvs.py4
-rw-r--r--pylib/gyp/xcode_emulation.py2
-rw-r--r--test/mac/clang-cxx-library/libc++.cc4
-rw-r--r--test/mac/clang-cxx-library/libstdc++.cc2
-rw-r--r--test/mac/gyptest-clang-cxx-library.py7
5 files changed, 10 insertions, 9 deletions
diff --git a/pylib/gyp/generator/msvs.py b/pylib/gyp/generator/msvs.py
index b5c64de0..f361571c 100644
--- a/pylib/gyp/generator/msvs.py
+++ b/pylib/gyp/generator/msvs.py
@@ -829,7 +829,7 @@ def _AdjustSourcesForRules(spec, rules, sources, excluded_sources):
outputs = OrderedSet(_FixPaths(outputs))
inputs.remove(_FixPath(trigger_file))
sources.update(inputs)
- if not spec.get('msvs_external_builder'):
+ if spec['type'] != 'none' and not spec.get('msvs_external_builder'):
excluded_sources.update(inputs)
sources.update(outputs)
@@ -1388,7 +1388,7 @@ def _PrepareListOfSources(spec, generator_flags, gyp_file):
# Add all inputs to sources and excluded sources.
inputs = OrderedSet(inputs)
sources.update(inputs)
- if not spec.get('msvs_external_builder'):
+ if spec['type'] != 'none' and not spec.get('msvs_external_builder'):
excluded_sources.update(inputs)
if int(a.get('process_outputs_as_sources', False)):
_AddNormalizedSources(sources, a.get('outputs', []))
diff --git a/pylib/gyp/xcode_emulation.py b/pylib/gyp/xcode_emulation.py
index d856e572..859cd5a9 100644
--- a/pylib/gyp/xcode_emulation.py
+++ b/pylib/gyp/xcode_emulation.py
@@ -794,6 +794,8 @@ class XcodeSettings(object):
for directory in framework_dirs:
ldflags.append('-F' + directory.replace('$(SDKROOT)', sdk_root))
+ self._Appendf(ldflags, 'CLANG_CXX_LIBRARY', '-stdlib=%s')
+
self.configname = None
return ldflags
diff --git a/test/mac/clang-cxx-library/libc++.cc b/test/mac/clang-cxx-library/libc++.cc
index 20114b50..b8d6e6b3 100644
--- a/test/mac/clang-cxx-library/libc++.cc
+++ b/test/mac/clang-cxx-library/libc++.cc
@@ -2,10 +2,10 @@
// Use of this source code is governed by a BSD-style license that can be
// found in the LICENSE file.
-#include <ciso646>
+#include <string>
#ifndef _LIBCPP_VERSION
#error expected std library: libc++
#endif
-int main() { return 0; }
+int main() { std::string x; return x.size(); }
diff --git a/test/mac/clang-cxx-library/libstdc++.cc b/test/mac/clang-cxx-library/libstdc++.cc
index a6527383..474dbf35 100644
--- a/test/mac/clang-cxx-library/libstdc++.cc
+++ b/test/mac/clang-cxx-library/libstdc++.cc
@@ -7,5 +7,5 @@
#error expected std library: libstdc++
#endif
-int main() { return 0; }
+int main() { std::string x; return x.size(); }
diff --git a/test/mac/gyptest-clang-cxx-library.py b/test/mac/gyptest-clang-cxx-library.py
index 160d54c8..39a11c75 100644
--- a/test/mac/gyptest-clang-cxx-library.py
+++ b/test/mac/gyptest-clang-cxx-library.py
@@ -9,20 +9,19 @@ Verifies that CLANG_CXX_LIBRARY works.
"""
import TestGyp
+import TestMac
import os
import sys
if sys.platform == 'darwin':
- test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode'])
-
# Xcode 4.2 on OS X 10.6 doesn't install the libc++ headers, don't run this
# test there.
- if not os.path.isdir('/usr/lib/c++'):
+ if TestMac.Xcode.Version() <= '0420':
sys.exit(0)
+ test = TestGyp.TestGyp(formats=['make', 'ninja', 'xcode'])
test.run_gyp('clang-cxx-library.gyp', chdir='clang-cxx-library')
-
test.build('clang-cxx-library.gyp', test.ALL, chdir='clang-cxx-library')
test.pass_test()