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

Side by Side Diff: build/common.gypi

Issue 7779039: Set CC to clang when GYP_DEFINES=clang=1. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: Created 9 years, 3 months 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 | « no previous file | no next file » | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 # Copyright (c) 2011 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2011 The Chromium Authors. All rights reserved.
2 # Use of this source code is governed by a BSD-style license that can be 2 # Use of this source code is governed by a BSD-style license that can be
3 # found in the LICENSE file. 3 # found in the LICENSE file.
4 4
5 # IMPORTANT: 5 # IMPORTANT:
6 # Please don't directly include this file if you are building via gyp_chromium, 6 # Please don't directly include this file if you are building via gyp_chromium,
7 # since gyp_chromium is automatically forcing its inclusion. 7 # since gyp_chromium is automatically forcing its inclusion.
8 { 8 {
9 # Variables expected to be overriden on the GYP command line (-D) or by 9 # Variables expected to be overriden on the GYP command line (-D) or by
10 # ~/.gyp/include.gypi. 10 # ~/.gyp/include.gypi.
(...skipping 1658 matching lines...) Expand 10 before | Expand all | Expand 10 after
1669 '-Wno-unused-parameter', 1669 '-Wno-unused-parameter',
1670 # Don't warn about the "struct foo f = {0};" initialization 1670 # Don't warn about the "struct foo f = {0};" initialization
1671 # pattern. 1671 # pattern.
1672 '-Wno-missing-field-initializers', 1672 '-Wno-missing-field-initializers',
1673 ], 1673 ],
1674 'conditions': [ 1674 'conditions': [
1675 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'}, 1675 ['chromium_mac_pch', {'GCC_PRECOMPILE_PREFIX_HEADER': 'YES'},
1676 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'} 1676 {'GCC_PRECOMPILE_PREFIX_HEADER': 'NO'}
1677 ], 1677 ],
1678 ['clang==1', { 1678 ['clang==1', {
1679 'CC': '$(SOURCE_ROOT)/<(clang_dir)/clang',
1680 'LDPLUSPLUS': '$(SOURCE_ROOT)/<(clang_dir)/clang++',
Evan Martin 2011/09/06 17:41:16 Where does SOURCE_ROOT come from?
Nico 2011/09/06 17:47:08 I think it's one of the many magic environment var
1681 'GCC_VERSION': 'com.apple.compilers.llvm.clang.1_0',
1679 'WARNING_CFLAGS': [ 1682 'WARNING_CFLAGS': [
1680 '-Wheader-hygiene', 1683 '-Wheader-hygiene',
1681 # Don't die on dtoa code that uses a char as an array index. 1684 # Don't die on dtoa code that uses a char as an array index.
1682 # This is required solely for base/third_party/dmg_fp/dtoa.cc. 1685 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
1683 '-Wno-char-subscripts', 1686 '-Wno-char-subscripts',
1684 # Clang spots more unused functions. 1687 # Clang spots more unused functions.
1685 '-Wno-unused-function', 1688 '-Wno-unused-function',
1686 # See comments on this flag higher up in this file. 1689 # See comments on this flag higher up in this file.
1687 '-Wno-unnamed-type-template-args', 1690 '-Wno-unnamed-type-template-args',
1688 # TODO(thakis): Reenable once the one instance this warns on 1691 # TODO(thakis): Reenable once the one instance this warns on
1689 # is fixed. 1692 # is fixed.
1690 '-Wno-parentheses', 1693 '-Wno-parentheses',
1691 ], 1694 ],
1692 }], 1695 }],
1693 ['clang==1 and clang_use_chrome_plugins==1', { 1696 ['clang==1 and clang_use_chrome_plugins==1', {
1694 'OTHER_CFLAGS': [ 1697 'OTHER_CFLAGS': [
1695 '<(clang_chrome_plugins_flags)', 1698 '<(clang_chrome_plugins_flags)',
1696 ], 1699 ],
1697 }], 1700 }],
1698 ['clang==1 and clang_load!="" and clang_add_plugin!=""', { 1701 ['clang==1 and clang_load!="" and clang_add_plugin!=""', {
1699 'OTHER_CFLAGS': [ 1702 'OTHER_CFLAGS': [
1700 '-Xclang', '-load', '-Xclang', '<(clang_load)', 1703 '-Xclang', '-load', '-Xclang', '<(clang_load)',
1701 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', 1704 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)',
1702 ], 1705 ],
1703 }], 1706 }],
1704 ], 1707 ],
1705 }, 1708 },
1709 'conditions': [
1710 ['clang==1', {
1711 'variables': {
1712 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin',
1713 },
1714 }],
1715 ],
1706 'target_conditions': [ 1716 'target_conditions': [
1707 ['_type!="static_library"', { 1717 ['_type!="static_library"', {
1708 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']}, 1718 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-search_paths_first']},
1709 }], 1719 }],
1710 ['_mac_bundle', { 1720 ['_mac_bundle', {
1711 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']}, 1721 'xcode_settings': {'OTHER_LDFLAGS': ['-Wl,-ObjC']},
1712 }], 1722 }],
1713 ['_type=="executable"', { 1723 ['_type=="executable"', {
1714 'postbuilds': [ 1724 'postbuilds': [
1715 { 1725 {
(...skipping 287 matching lines...) Expand 10 before | Expand all | Expand 10 after
2003 }, 2013 },
2004 }, 2014 },
2005 }], 2015 }],
2006 ['enable_new_npdevice_api==1', { 2016 ['enable_new_npdevice_api==1', {
2007 'target_defaults': { 2017 'target_defaults': {
2008 'defines': [ 2018 'defines': [
2009 'ENABLE_NEW_NPDEVICE_API', 2019 'ENABLE_NEW_NPDEVICE_API',
2010 ], 2020 ],
2011 }, 2021 },
2012 }], 2022 }],
2023 ['clang==1', {
2024 'make_global_settings': [
2025 ['CC', 'third_party/llvm-build/Release+Asserts/bin/clang'],
2026 ['CXX', 'third_party/llvm-build/Release+Asserts/bin/clang++'],
2027 ['LINK', 'third_party/llvm-build/Release+Asserts/bin/clang++'],
Mark Mentovai 2011/09/07 01:36:24 This is fine for now. We’ll need to split this up
2028 ['CC.host', '$(CC)'],
2029 ['CXX.host', '$(CXX)'],
2030 ['LINK.host', '$(LINK)'],
2031 ],
2032 }],
2013 ], 2033 ],
2014 'xcode_settings': { 2034 'xcode_settings': {
2015 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! 2035 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
2016 # This block adds *project-wide* configuration settings to each project 2036 # This block adds *project-wide* configuration settings to each project
2017 # file. It's almost always wrong to put things here. Specify your 2037 # file. It's almost always wrong to put things here. Specify your
2018 # custom xcode_settings in target_defaults to add them to targets instead. 2038 # custom xcode_settings in target_defaults to add them to targets instead.
2019 2039
2020 # In an Xcode Project Info window, the "Base SDK for All Configurations" 2040 # In an Xcode Project Info window, the "Base SDK for All Configurations"
2021 # setting sets the SDK on a project-wide basis. In order to get the 2041 # setting sets the SDK on a project-wide basis. In order to get the
2022 # configured SDK to show properly in the Xcode UI, SDKROOT must be set 2042 # configured SDK to show properly in the Xcode UI, SDKROOT must be set
2023 # here at the project level. 2043 # here at the project level.
2024 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot 2044 'SDKROOT': 'macosx<(mac_sdk)', # -isysroot
2025 2045
2026 # The Xcode generator will look for an xcode_settings section at the root 2046 # The Xcode generator will look for an xcode_settings section at the root
2027 # of each dict and use it to apply settings on a file-wide basis. Most 2047 # of each dict and use it to apply settings on a file-wide basis. Most
2028 # settings should not be here, they should be in target-specific 2048 # settings should not be here, they should be in target-specific
2029 # xcode_settings sections, or better yet, should use non-Xcode-specific 2049 # xcode_settings sections, or better yet, should use non-Xcode-specific
2030 # settings in target dicts. SYMROOT is a special case, because many other 2050 # settings in target dicts. SYMROOT is a special case, because many other
2031 # Xcode variables depend on it, including variables such as 2051 # Xcode variables depend on it, including variables such as
2032 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 2052 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
2033 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 2053 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
2034 # files to appear (when present) in the UI as actual files and not red 2054 # files to appear (when present) in the UI as actual files and not red
2035 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 2055 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
2036 # and therefore SYMROOT, needs to be set at the project level. 2056 # and therefore SYMROOT, needs to be set at the project level.
2037 'SYMROOT': '<(DEPTH)/xcodebuild', 2057 'SYMROOT': '<(DEPTH)/xcodebuild',
2038 }, 2058 },
2039 } 2059 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698