Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2)

Side by Side Diff: test/mac/gyptest-xcode-gcc.py

Issue 61293005: ninja: use clang by default on Mac, matching recent Xcodes (Closed) Base URL: http://gyp.googlecode.com/svn/trunk/
Patch Set: Created 7 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/mac/xcode-gcc/test.gyp » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 #!/usr/bin/env python 1 #!/usr/bin/env python
2 2
3 # Copyright (c) 2012 Google Inc. All rights reserved. 3 # Copyright (c) 2012 Google Inc. All rights reserved.
4 # Use of this source code is governed by a BSD-style license that can be 4 # Use of this source code is governed by a BSD-style license that can be
5 # found in the LICENSE file. 5 # found in the LICENSE file.
6 6
7 """ 7 """
8 Verifies that xcode-style GCC_... settings are handled properly. 8 Verifies that xcode-style GCC_... settings are handled properly.
9 """ 9 """
10 10
(...skipping 13 matching lines...) Expand all
24 24
25 # List of targets that'll pass. It expects targets of the same name with 25 # List of targets that'll pass. It expects targets of the same name with
26 # '-fail' appended that'll fail to build. 26 # '-fail' appended that'll fail to build.
27 targets = [ 27 targets = [
28 'warn_about_missing_newline', 28 'warn_about_missing_newline',
29 ] 29 ]
30 30
31 # clang doesn't warn on invalid offsetofs, it silently ignores 31 # clang doesn't warn on invalid offsetofs, it silently ignores
32 # -Wno-invalid-offsetof. 32 # -Wno-invalid-offsetof.
33 # TODO(thakis): This isn't really the right way to detect the compiler, 33 # TODO(thakis): This isn't really the right way to detect the compiler,
34 # `which cc` detects what make ends up using, and Xcode has some embedded 34 # Xcode has some embedded compiler, but it's a reliable proxy at least on
35 # compiler, but it's a reliable proxy at least on the bots. 35 # the bots. The compiler is forced to gcc/g++ in the gyp file in a
36 if os.readlink('/usr/bin/cc') != 'clang': 36 # make_global_settings section for ninja and make.
37 if test.format != 'xcode' or os.readlink('/usr/bin/cc') != 'clang':
37 targets.append('warn_about_invalid_offsetof_macro') 38 targets.append('warn_about_invalid_offsetof_macro')
38 39
39 for target in targets: 40 for target in targets:
40 test.build('test.gyp', target, chdir=CHDIR) 41 test.build('test.gyp', target, chdir=CHDIR)
41 test.built_file_must_exist(target, chdir=CHDIR) 42 test.built_file_must_exist(target, chdir=CHDIR)
42 fail_target = target + '-fail' 43 fail_target = target + '-fail'
43 test.build('test.gyp', fail_target, chdir=CHDIR, status=None, 44 test.build('test.gyp', fail_target, chdir=CHDIR, status=None,
44 stderr=None, match=IgnoreOutput) 45 stderr=None, match=IgnoreOutput)
45 test.built_file_must_not_exist(fail_target, chdir=CHDIR) 46 test.built_file_must_not_exist(fail_target, chdir=CHDIR)
46 47
47 test.pass_test() 48 test.pass_test()
OLDNEW
« no previous file with comments | « pylib/gyp/generator/ninja.py ('k') | test/mac/xcode-gcc/test.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698