Chromium Code Reviews| 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 3260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3271 'WTF_USE_DYNAMIC_ANNOTATIONS=1', | 3271 'WTF_USE_DYNAMIC_ANNOTATIONS=1', |
| 3272 ], | 3272 ], |
| 3273 }], | 3273 }], |
| 3274 ['win_use_allocator_shim==0', { | 3274 ['win_use_allocator_shim==0', { |
| 3275 'defines': ['NO_TCMALLOC'], | 3275 'defines': ['NO_TCMALLOC'], |
| 3276 }], | 3276 }], |
| 3277 # _FORTIFY_SOURCE isn't really supported by Clang now, see | 3277 # _FORTIFY_SOURCE isn't really supported by Clang now, see |
| 3278 # http://llvm.org/bugs/show_bug.cgi?id=16821. | 3278 # http://llvm.org/bugs/show_bug.cgi?id=16821. |
| 3279 # It seems to work fine with Ubuntu 12 headers though, so use it | 3279 # It seems to work fine with Ubuntu 12 headers though, so use it |
| 3280 # in official builds. | 3280 # in official builds. |
| 3281 ['os_posix==1 and (asan!=1 and msan!=1 and tsan!=1 and lsan!=1 and ubs an!=1) and (OS!="linux" or clang!=1 or buildtype=="Official")', { | 3281 ['os_posix==1 and (asan!=1 and msan!=1 and tsan!=1 and lsan!=1 and ubs an!=1) and (OS!="linux" or clang!=1 or buildtype=="Official")', { |
|
Nico
2014/07/17 16:08:55
This used to not be in a buildtype=="Official" sec
tzik
2014/07/17 17:29:05
The -Wno-error flag was for asan==1 case, and this
| |
| 3282 'target_conditions': [ | 3282 'target_conditions': [ |
| 3283 ['chromium_code==1', { | 3283 ['chromium_code==1', { |
| 3284 # Non-chromium code is not guaranteed to compile cleanly | 3284 # Non-chromium code is not guaranteed to compile cleanly |
| 3285 # with _FORTIFY_SOURCE. Also, fortified build may fail | 3285 # with _FORTIFY_SOURCE. Also, fortified build may fail |
| 3286 # when optimizations are disabled, so only do that for Release | 3286 # when optimizations are disabled, so only do that for Release |
| 3287 # build. | 3287 # build. |
| 3288 'defines': [ | 3288 'defines': [ |
| 3289 '_FORTIFY_SOURCE=2', | 3289 '_FORTIFY_SOURCE=2', |
| 3290 ], | 3290 ], |
| 3291 }], | 3291 }], |
| (...skipping 690 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3982 '<(DEPTH)/base/base.gyp:sanitizer_options', | 3982 '<(DEPTH)/base/base.gyp:sanitizer_options', |
| 3983 ], | 3983 ], |
| 3984 }], | 3984 }], |
| 3985 ], | 3985 ], |
| 3986 }], | 3986 }], |
| 3987 ['asan==1', { | 3987 ['asan==1', { |
| 3988 'target_conditions': [ | 3988 'target_conditions': [ |
| 3989 ['_toolset=="target"', { | 3989 ['_toolset=="target"', { |
| 3990 'cflags': [ | 3990 'cflags': [ |
| 3991 '-fsanitize=address', | 3991 '-fsanitize=address', |
| 3992 '-Wno-error=macro-redefined', # http://crbug.com/162783 | |
| 3993 ], | 3992 ], |
| 3994 'ldflags': [ | 3993 'ldflags': [ |
| 3995 '-fsanitize=address', | 3994 '-fsanitize=address', |
| 3996 ], | 3995 ], |
| 3997 }], | 3996 }], |
| 3998 ], | 3997 ], |
| 3999 'conditions': [ | 3998 'conditions': [ |
| 4000 ['OS=="mac"', { | 3999 ['OS=="mac"', { |
| 4001 'cflags': [ | 4000 'cflags': [ |
| 4002 '-mllvm -asan-globals=0', # http://crbug.com/352073 | 4001 '-mllvm -asan-globals=0', # http://crbug.com/352073 |
| 4003 '-Wno-error=unused-function', # http://crbug.com/162783 | 4002 '-Wno-error=unused-function', # http://crbug.com/162783 |
| 4004 ], | 4003 ], |
| 4005 }], | 4004 }], |
| 4006 ], | 4005 ], |
| 4007 }], | 4006 }], |
| 4008 ['ubsan==1', { | 4007 ['ubsan==1', { |
| 4009 'target_conditions': [ | 4008 'target_conditions': [ |
| 4010 ['_toolset=="target"', { | 4009 ['_toolset=="target"', { |
| 4011 'cflags': [ | 4010 'cflags': [ |
| 4012 '-fsanitize=undefined', | 4011 '-fsanitize=undefined', |
| 4013 # -fsanitize=vptr is incompatible with -fno-rtti. | 4012 # -fsanitize=vptr is incompatible with -fno-rtti. |
| 4014 '-fno-sanitize=vptr', | 4013 '-fno-sanitize=vptr', |
| 4015 '-Wno-error=macro-redefined', # http://crbug.com/162783 | |
| 4016 ], | 4014 ], |
| 4017 'ldflags': [ | 4015 'ldflags': [ |
| 4018 '-fsanitize=undefined', | 4016 '-fsanitize=undefined', |
| 4019 # -fsanitize=vptr is incompatible with -fno-rtti. | 4017 # -fsanitize=vptr is incompatible with -fno-rtti. |
| 4020 '-fno-sanitize=vptr', | 4018 '-fno-sanitize=vptr', |
| 4021 ], | 4019 ], |
| 4022 }], | 4020 }], |
| 4023 ], | 4021 ], |
| 4024 'conditions': [ | 4022 'conditions': [ |
| 4025 ['OS=="mac"', { | 4023 ['OS=="mac"', { |
| 4026 'cflags': [ | 4024 'cflags': [ |
| 4027 '-Wno-error=unused-function', # http://crbug.com/162783 | 4025 '-Wno-error=unused-function', # http://crbug.com/162783 |
| 4028 ], | 4026 ], |
| 4029 }], | 4027 }], |
| 4030 ], | 4028 ], |
| 4031 }], | 4029 }], |
| 4032 ['ubsan_vptr==1', { | 4030 ['ubsan_vptr==1', { |
| 4033 'target_conditions': [ | 4031 'target_conditions': [ |
| 4034 ['_toolset=="target"', { | 4032 ['_toolset=="target"', { |
| 4035 'cflags': [ | 4033 'cflags': [ |
| 4036 '-fsanitize=vptr', | 4034 '-fsanitize=vptr', |
| 4037 '-fsanitize=null', # Avoid dereferences on null pointer objec ts. | 4035 '-fsanitize=null', # Avoid dereferences on null pointer objec ts. |
| 4038 '-fsanitize-blacklist=<(ubsan_vptr_blacklist)', | 4036 '-fsanitize-blacklist=<(ubsan_vptr_blacklist)', |
| 4039 '-Wno-error=macro-redefined', # http://crbug.com/162783 | |
| 4040 ], | 4037 ], |
| 4041 'cflags_cc!': [ | 4038 'cflags_cc!': [ |
| 4042 '-fno-rtti', | 4039 '-fno-rtti', |
| 4043 ], | 4040 ], |
| 4044 'cflags!': [ | 4041 'cflags!': [ |
| 4045 '-fno-rtti', | 4042 '-fno-rtti', |
| 4046 ], | 4043 ], |
| 4047 'ldflags': [ | 4044 'ldflags': [ |
| 4048 '-fsanitize=vptr', # -fsanitize=null is not necessary. | 4045 '-fsanitize=vptr', # -fsanitize=null is not necessary. |
| 4049 ], | 4046 ], |
| (...skipping 575 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4625 }], | 4622 }], |
| 4626 ], | 4623 ], |
| 4627 }], | 4624 }], |
| 4628 # Settings for building host targets using the system toolchain. | 4625 # Settings for building host targets using the system toolchain. |
| 4629 ['_toolset=="host"', { | 4626 ['_toolset=="host"', { |
| 4630 'cflags!': [ | 4627 'cflags!': [ |
| 4631 # Due to issues in Clang build system, using ASan on 32-bit | 4628 # Due to issues in Clang build system, using ASan on 32-bit |
| 4632 # binaries on x86_64 host is problematic. | 4629 # binaries on x86_64 host is problematic. |
| 4633 # TODO(eugenis): re-enable. | 4630 # TODO(eugenis): re-enable. |
| 4634 '-fsanitize=address', | 4631 '-fsanitize=address', |
| 4635 '-Wno-error=macro-redefined', # http://crbug.com/162783 | |
| 4636 | |
| 4637 ], | 4632 ], |
| 4638 'ldflags!': [ | 4633 'ldflags!': [ |
| 4639 '-fsanitize=address', | 4634 '-fsanitize=address', |
| 4640 '-Wl,-z,noexecstack', | 4635 '-Wl,-z,noexecstack', |
| 4641 '-Wl,--gc-sections', | 4636 '-Wl,--gc-sections', |
| 4642 '-Wl,-O1', | 4637 '-Wl,-O1', |
| 4643 '-Wl,--as-needed', | 4638 '-Wl,--as-needed', |
| 4644 '-Wl,--warn-shared-textrel', | 4639 '-Wl,--warn-shared-textrel', |
| 4645 '-Wl,--fatal-warnings', | 4640 '-Wl,--fatal-warnings', |
| 4646 ], | 4641 ], |
| (...skipping 149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 4796 ['clang==1', { | 4791 ['clang==1', { |
| 4797 'variables': { | 4792 'variables': { |
| 4798 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', | 4793 'clang_dir': '../third_party/llvm-build/Release+Asserts/bin', |
| 4799 }, | 4794 }, |
| 4800 }], | 4795 }], |
| 4801 ['asan==1', { | 4796 ['asan==1', { |
| 4802 'xcode_settings': { | 4797 'xcode_settings': { |
| 4803 'OTHER_CFLAGS': [ | 4798 'OTHER_CFLAGS': [ |
| 4804 '-fsanitize=address', | 4799 '-fsanitize=address', |
| 4805 '-mllvm -asan-globals=0', # http://crbug.com/352073 | 4800 '-mllvm -asan-globals=0', # http://crbug.com/352073 |
| 4806 '-Wno-error=macro-redefined', # http://crbug.com/162783 | |
| 4807 '-Wno-error=unused-function', # http://crbug.com/162783 | 4801 '-Wno-error=unused-function', # http://crbug.com/162783 |
| 4808 '-gline-tables-only', | 4802 '-gline-tables-only', |
| 4809 ], | 4803 ], |
| 4810 }, | 4804 }, |
| 4811 }], | 4805 }], |
| 4812 ['asan_coverage!=0', { | 4806 ['asan_coverage!=0', { |
| 4813 'target_conditions': [ | 4807 'target_conditions': [ |
| 4814 ['_toolset=="target"', { | 4808 ['_toolset=="target"', { |
| 4815 'cflags': [ | 4809 'cflags': [ |
| 4816 '-mllvm -asan-coverage=<(asan_coverage)', | 4810 '-mllvm -asan-coverage=<(asan_coverage)', |
| (...skipping 838 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5655 # settings in target dicts. SYMROOT is a special case, because many other | 5649 # settings in target dicts. SYMROOT is a special case, because many other |
| 5656 # Xcode variables depend on it, including variables such as | 5650 # Xcode variables depend on it, including variables such as |
| 5657 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 5651 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
| 5658 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 5652 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
| 5659 # files to appear (when present) in the UI as actual files and not red | 5653 # files to appear (when present) in the UI as actual files and not red |
| 5660 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 5654 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
| 5661 # and therefore SYMROOT, needs to be set at the project level. | 5655 # and therefore SYMROOT, needs to be set at the project level. |
| 5662 'SYMROOT': '<(DEPTH)/xcodebuild', | 5656 'SYMROOT': '<(DEPTH)/xcodebuild', |
| 5663 }, | 5657 }, |
| 5664 } | 5658 } |
| OLD | NEW |