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

Side by Side Diff: build/common.gypi

Issue 11468005: clang: Build in C++11 mode on linux & cros too. (Closed) Base URL: svn://svn.chromium.org/chrome/trunk/src
Patch Set: asan in, cros out Created 7 years, 7 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) 2012 The Chromium Authors. All rights reserved. 1 # Copyright (c) 2012 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 2985 matching lines...) Expand 10 before | Expand all | Expand 10 after
2996 ], 2996 ],
2997 'ldflags': [ 2997 'ldflags': [
2998 '--sysroot=<(sysroot)', 2998 '--sysroot=<(sysroot)',
2999 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', 2999 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))',
3000 ], 3000 ],
3001 }]] 3001 }]]
3002 }], 3002 }],
3003 ['clang==1', { 3003 ['clang==1', {
3004 'cflags': [ 3004 'cflags': [
3005 '-Wheader-hygiene', 3005 '-Wheader-hygiene',
3006
3007 # Don't die on dtoa code that uses a char as an array index.
3008 '-Wno-char-subscripts',
3009
3006 # Clang spots more unused functions. 3010 # Clang spots more unused functions.
3007 '-Wno-unused-function', 3011 '-Wno-unused-function',
3008 # Don't die on dtoa code that uses a char as an array index.
3009 '-Wno-char-subscripts',
3010 # Especially needed for gtest macros using enum values from Mac
3011 # system headers.
3012 # TODO(pkasting): In C++11 this is legal, so this should be
3013 # removed when we change to that. (This is also why we don't
3014 # bother fixing all these cases today.)
3015 '-Wno-unnamed-type-template-args',
3016 # This (rightfully) complains about 'override', which we use
3017 # heavily.
3018 '-Wno-c++11-extensions',
3019 3012
3020 # Warns on switches on enums that cover all enum values but 3013 # Warns on switches on enums that cover all enum values but
3021 # also contain a default: branch. Chrome is full of that. 3014 # also contain a default: branch. Chrome is full of that.
3022 '-Wno-covered-switch-default', 3015 '-Wno-covered-switch-default',
3023 3016
3024 # Warns when a const char[] is converted to bool. 3017 # Warns when a const char[] is converted to bool.
3025 '-Wstring-conversion', 3018 '-Wstring-conversion',
3026 ], 3019 ],
3027 'cflags!': [ 3020 'cflags!': [
3028 # Clang doesn't seem to know know this flag. 3021 # Clang doesn't seem to know know this flag.
3029 '-mfpmath=sse', 3022 '-mfpmath=sse',
3030 ], 3023 ],
3031 }], 3024 }],
3025 ['clang==1 and (OS!="android" and chromeos!=1)', {
3026 # Turn on C++11.
3027 'cflags': [
3028 # This warns on using ints as initializers for floats in
3029 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|),
3030 # which happens in several places in chrome code. Not sure if
3031 # this is worth fixing.
3032 '-Wno-c++11-narrowing',
3033
3034 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3035 # user-defined literals, this is now a string literal with a UD
3036 # suffix. However, this is used heavily in NaCl code, so disable
3037 # the warning for now.
3038 '-Wno-reserved-user-defined-literal',
3039 ],
3040 'cflags_cc': [
3041 # See the comment in the Mac section for what it takes to move
3042 # this to -std=c++11.
3043 '-std=gnu++11',
tfarina 2013/05/01 23:44:55 looks like this broke my build, and the instructio
3044 ],
3045 }],
3046 ['clang==1 and (OS=="android" or chromeos==1)', {
3047 # Android uses gcc4.4, and clang isn't compatible with gcc4.4's
3048 # libstdc++ in C++11 mode. So no C++11 mode for Android yet.
3049 # Doesn't work with asan for some reason either: crbug.com/233464
3050 'cflags': [
3051 # Especially needed for gtest macros using enum values from Mac
3052 # system headers.
3053 # TODO(pkasting): In C++11 this is legal, so this should be
3054 # removed when we change to that. (This is also why we don't
3055 # bother fixing all these cases today.)
3056 '-Wno-unnamed-type-template-args',
3057 # This (rightfully) complains about 'override', which we use
3058 # heavily.
3059 '-Wno-c++11-extensions',
3060 ],
3061 }],
3032 ['clang==1 and clang_use_chrome_plugins==1', { 3062 ['clang==1 and clang_use_chrome_plugins==1', {
3033 'cflags': [ 3063 'cflags': [
3034 '<@(clang_chrome_plugins_flags)', 3064 '<@(clang_chrome_plugins_flags)',
3035 ], 3065 ],
3036 }], 3066 }],
3037 ['clang==1 and clang_load!=""', { 3067 ['clang==1 and clang_load!=""', {
3038 'cflags': [ 3068 'cflags': [
3039 '-Xclang', '-load', '-Xclang', '<(clang_load)', 3069 '-Xclang', '-load', '-Xclang', '<(clang_load)',
3040 ], 3070 ],
3041 }], 3071 }],
(...skipping 616 matching lines...) Expand 10 before | Expand all | Expand 10 after
3658 3688
3659 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11 3689 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11
3660 # user-defined literals, this is now a string literal with a UD 3690 # user-defined literals, this is now a string literal with a UD
3661 # suffix. However, this is used heavily in NaCl code, so disable 3691 # suffix. However, this is used heavily in NaCl code, so disable
3662 # the warning for now. 3692 # the warning for now.
3663 '-Wno-reserved-user-defined-literal', 3693 '-Wno-reserved-user-defined-literal',
3664 3694
3665 # Don't die on dtoa code that uses a char as an array index. 3695 # Don't die on dtoa code that uses a char as an array index.
3666 # This is required solely for base/third_party/dmg_fp/dtoa.cc. 3696 # This is required solely for base/third_party/dmg_fp/dtoa.cc.
3667 '-Wno-char-subscripts', 3697 '-Wno-char-subscripts',
3698
3668 # Clang spots more unused functions. 3699 # Clang spots more unused functions.
3669 '-Wno-unused-function', 3700 '-Wno-unused-function',
3670 3701
3671 # Warns on switches on enums that cover all enum values but 3702 # Warns on switches on enums that cover all enum values but
3672 # also contain a default: branch. Chrome is full of that. 3703 # also contain a default: branch. Chrome is full of that.
3673 '-Wno-covered-switch-default', 3704 '-Wno-covered-switch-default',
3674 3705
3675 # Warns when a const char[] is converted to bool. 3706 # Warns when a const char[] is converted to bool.
3676 '-Wstring-conversion', 3707 '-Wstring-conversion',
3677 ], 3708 ],
(...skipping 691 matching lines...) Expand 10 before | Expand all | Expand 10 after
4369 # settings in target dicts. SYMROOT is a special case, because many other 4400 # settings in target dicts. SYMROOT is a special case, because many other
4370 # Xcode variables depend on it, including variables such as 4401 # Xcode variables depend on it, including variables such as
4371 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 4402 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
4372 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 4403 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
4373 # files to appear (when present) in the UI as actual files and not red 4404 # files to appear (when present) in the UI as actual files and not red
4374 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 4405 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
4375 # and therefore SYMROOT, needs to be set at the project level. 4406 # and therefore SYMROOT, needs to be set at the project level.
4376 'SYMROOT': '<(DEPTH)/xcodebuild', 4407 'SYMROOT': '<(DEPTH)/xcodebuild',
4377 }, 4408 },
4378 } 4409 }
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