| OLD | NEW |
| 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 2910 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2921 ], | 2921 ], |
| 2922 'ldflags': [ | 2922 'ldflags': [ |
| 2923 '--sysroot=<(sysroot)', | 2923 '--sysroot=<(sysroot)', |
| 2924 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', | 2924 '<!(<(DEPTH)/build/linux/sysroot_ld_path.sh <(sysroot))', |
| 2925 ], | 2925 ], |
| 2926 }]] | 2926 }]] |
| 2927 }], | 2927 }], |
| 2928 ['clang==1', { | 2928 ['clang==1', { |
| 2929 'cflags': [ | 2929 'cflags': [ |
| 2930 '-Wheader-hygiene', | 2930 '-Wheader-hygiene', |
| 2931 | 2931 # Clang spots more unused functions. |
| 2932 '-Wno-unused-function', |
| 2932 # Don't die on dtoa code that uses a char as an array index. | 2933 # Don't die on dtoa code that uses a char as an array index. |
| 2933 '-Wno-char-subscripts', | 2934 '-Wno-char-subscripts', |
| 2934 | 2935 # Especially needed for gtest macros using enum values from Mac |
| 2935 # Clang spots more unused functions. | 2936 # system headers. |
| 2936 '-Wno-unused-function', | 2937 # TODO(pkasting): In C++11 this is legal, so this should be |
| 2938 # removed when we change to that. (This is also why we don't |
| 2939 # bother fixing all these cases today.) |
| 2940 '-Wno-unnamed-type-template-args', |
| 2941 # This (rightfully) complains about 'override', which we use |
| 2942 # heavily. |
| 2943 '-Wno-c++11-extensions', |
| 2937 | 2944 |
| 2938 # Warns on switches on enums that cover all enum values but | 2945 # Warns on switches on enums that cover all enum values but |
| 2939 # also contain a default: branch. Chrome is full of that. | 2946 # also contain a default: branch. Chrome is full of that. |
| 2940 '-Wno-covered-switch-default', | 2947 '-Wno-covered-switch-default', |
| 2941 | 2948 |
| 2942 # Warns when a const char[] is converted to bool. | 2949 # Warns when a const char[] is converted to bool. |
| 2943 '-Wstring-conversion', | 2950 '-Wstring-conversion', |
| 2944 ], | 2951 ], |
| 2945 'cflags!': [ | 2952 'cflags!': [ |
| 2946 # Clang doesn't seem to know know this flag. | 2953 # Clang doesn't seem to know know this flag. |
| 2947 '-mfpmath=sse', | 2954 '-mfpmath=sse', |
| 2948 ], | 2955 ], |
| 2949 }], | 2956 }], |
| 2950 ['clang==1 and (OS!="android" and asan!=1)', { | |
| 2951 # Turn on C++11. | |
| 2952 'cflags': [ | |
| 2953 # This warns on using ints as initializers for floats in | |
| 2954 # initializer lists (e.g. |int a = f(); CGSize s = { a, a };|), | |
| 2955 # which happens in several places in chrome code. Not sure if | |
| 2956 # this is worth fixing. | |
| 2957 '-Wno-c++11-narrowing', | |
| 2958 | |
| 2959 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11 | |
| 2960 # user-defined literals, this is now a string literal with a UD | |
| 2961 # suffix. However, this is used heavily in NaCl code, so disable | |
| 2962 # the warning for now. | |
| 2963 '-Wno-reserved-user-defined-literal', | |
| 2964 ], | |
| 2965 'cflags_cc': [ | |
| 2966 # See the comment in the Mac section for what it takes to move | |
| 2967 # this to -std=c++11. | |
| 2968 '-std=gnu++11', | |
| 2969 ], | |
| 2970 }], | |
| 2971 ['clang==1 and (OS=="android" or asan==1)', { | |
| 2972 # Android uses gcc4.4, and clang isn't compatible with gcc4.4's | |
| 2973 # libstdc++ in C++11 mode. So no C++11 mode for Android yet. | |
| 2974 # Doesn't work with asan for some reason either: crbug.com/233464 | |
| 2975 'cflags': [ | |
| 2976 # Especially needed for gtest macros using enum values from Mac | |
| 2977 # system headers. | |
| 2978 # TODO(pkasting): In C++11 this is legal, so this should be | |
| 2979 # removed when we change to that. (This is also why we don't | |
| 2980 # bother fixing all these cases today.) | |
| 2981 '-Wno-unnamed-type-template-args', | |
| 2982 # This (rightfully) complains about 'override', which we use | |
| 2983 # heavily. | |
| 2984 '-Wno-c++11-extensions', | |
| 2985 ], | |
| 2986 }], | |
| 2987 ['clang==1 and clang_use_chrome_plugins==1', { | 2957 ['clang==1 and clang_use_chrome_plugins==1', { |
| 2988 'cflags': [ | 2958 'cflags': [ |
| 2989 '<@(clang_chrome_plugins_flags)', | 2959 '<@(clang_chrome_plugins_flags)', |
| 2990 ], | 2960 ], |
| 2991 }], | 2961 }], |
| 2992 ['clang==1 and clang_load!=""', { | 2962 ['clang==1 and clang_load!=""', { |
| 2993 'cflags': [ | 2963 'cflags': [ |
| 2994 '-Xclang', '-load', '-Xclang', '<(clang_load)', | 2964 '-Xclang', '-load', '-Xclang', '<(clang_load)', |
| 2995 ], | 2965 ], |
| 2996 }], | 2966 }], |
| (...skipping 589 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 3586 | 3556 |
| 3587 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11 | 3557 # This warns about code like |"0x%08"NACL_PRIxPTR| -- with C++11 |
| 3588 # user-defined literals, this is now a string literal with a UD | 3558 # user-defined literals, this is now a string literal with a UD |
| 3589 # suffix. However, this is used heavily in NaCl code, so disable | 3559 # suffix. However, this is used heavily in NaCl code, so disable |
| 3590 # the warning for now. | 3560 # the warning for now. |
| 3591 '-Wno-reserved-user-defined-literal', | 3561 '-Wno-reserved-user-defined-literal', |
| 3592 | 3562 |
| 3593 # Don't die on dtoa code that uses a char as an array index. | 3563 # Don't die on dtoa code that uses a char as an array index. |
| 3594 # This is required solely for base/third_party/dmg_fp/dtoa.cc. | 3564 # This is required solely for base/third_party/dmg_fp/dtoa.cc. |
| 3595 '-Wno-char-subscripts', | 3565 '-Wno-char-subscripts', |
| 3596 | |
| 3597 # Clang spots more unused functions. | 3566 # Clang spots more unused functions. |
| 3598 '-Wno-unused-function', | 3567 '-Wno-unused-function', |
| 3599 | 3568 |
| 3600 # Warns on switches on enums that cover all enum values but | 3569 # Warns on switches on enums that cover all enum values but |
| 3601 # also contain a default: branch. Chrome is full of that. | 3570 # also contain a default: branch. Chrome is full of that. |
| 3602 '-Wno-covered-switch-default', | 3571 '-Wno-covered-switch-default', |
| 3603 | 3572 |
| 3604 # Warns when a const char[] is converted to bool. | 3573 # Warns when a const char[] is converted to bool. |
| 3605 '-Wstring-conversion', | 3574 '-Wstring-conversion', |
| 3606 ], | 3575 ], |
| (...skipping 678 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4285 # settings in target dicts. SYMROOT is a special case, because many other | 4254 # settings in target dicts. SYMROOT is a special case, because many other |
| 4286 # Xcode variables depend on it, including variables such as | 4255 # Xcode variables depend on it, including variables such as |
| 4287 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 4256 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 4288 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 4257 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 4289 # files to appear (when present) in the UI as actual files and not red | 4258 # files to appear (when present) in the UI as actual files and not red |
| 4290 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 4259 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 4291 # and therefore SYMROOT, needs to be set at the project level. | 4260 # and therefore SYMROOT, needs to be set at the project level. |
| 4292 'SYMROOT': '<(DEPTH)/xcodebuild', | 4261 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 4293 }, | 4262 }, |
| 4294 } | 4263 } |
| OLD | NEW |