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 2957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2968 'cflags': [ | 2968 'cflags': [ |
2969 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', | 2969 '-Xclang', '-add-plugin', '-Xclang', '<(clang_add_plugin)', |
2970 ], | 2970 ], |
2971 }], | 2971 }], |
2972 ['clang==1 and "<(GENERATOR)"=="ninja"', { | 2972 ['clang==1 and "<(GENERATOR)"=="ninja"', { |
2973 'cflags': [ | 2973 'cflags': [ |
2974 # See http://crbug.com/110262 | 2974 # See http://crbug.com/110262 |
2975 '-fcolor-diagnostics', | 2975 '-fcolor-diagnostics', |
2976 ], | 2976 ], |
2977 }], | 2977 }], |
| 2978 # Common options for AddressSanitizer, ThreadSanitizer and |
| 2979 # MemorySanitizer. |
| 2980 ['asan==1 or tsan==1 or msan==1', { |
| 2981 'target_conditions': [ |
| 2982 ['_toolset=="target"', { |
| 2983 'cflags': [ |
| 2984 '-fno-omit-frame-pointer', |
| 2985 '-gline-tables-only', |
| 2986 ], |
| 2987 }], |
| 2988 ], |
| 2989 }], |
2978 ['asan==1', { | 2990 ['asan==1', { |
2979 'target_conditions': [ | 2991 'target_conditions': [ |
2980 ['_toolset=="target"', { | 2992 ['_toolset=="target"', { |
2981 'cflags': [ | 2993 'cflags': [ |
2982 '-fsanitize=address', | 2994 '-fsanitize=address', |
2983 '-fno-omit-frame-pointer', | |
2984 '-w', # http://crbug.com/162783 | 2995 '-w', # http://crbug.com/162783 |
2985 '-gline-tables-only', | |
2986 ], | 2996 ], |
2987 'ldflags': [ | 2997 'ldflags': [ |
2988 '-fsanitize=address', | 2998 '-fsanitize=address', |
2989 ], | 2999 ], |
2990 'defines': [ | 3000 'defines': [ |
2991 'ADDRESS_SANITIZER', | 3001 'ADDRESS_SANITIZER', |
2992 ], | 3002 ], |
2993 }], | 3003 }], |
2994 ], | 3004 ], |
2995 'conditions': [ | 3005 'conditions': [ |
2996 ['OS=="mac"', { | 3006 ['OS=="mac"', { |
2997 'cflags': [ | 3007 'cflags': [ |
2998 '-mllvm -asan-globals=0', # http://crbug.com/196561 | 3008 '-mllvm -asan-globals=0', # http://crbug.com/196561 |
2999 ], | 3009 ], |
3000 }], | 3010 }], |
3001 ], | 3011 ], |
3002 }], | 3012 }], |
3003 ['tsan==1', { | 3013 ['tsan==1', { |
3004 'target_conditions': [ | 3014 'target_conditions': [ |
3005 ['_toolset=="target"', { | 3015 ['_toolset=="target"', { |
3006 'cflags': [ | 3016 'cflags': [ |
3007 '-fsanitize=thread', | 3017 '-fsanitize=thread', |
3008 '-fno-omit-frame-pointer', | |
3009 '-fPIC', | 3018 '-fPIC', |
3010 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)', | 3019 '-mllvm', '-tsan-blacklist=<(tsan_blacklist)', |
3011 ], | 3020 ], |
3012 'ldflags': [ | 3021 'ldflags': [ |
3013 '-fsanitize=thread', | 3022 '-fsanitize=thread', |
3014 ], | 3023 ], |
3015 'defines': [ | 3024 'defines': [ |
3016 'THREAD_SANITIZER', | 3025 'THREAD_SANITIZER', |
3017 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1', | 3026 'DYNAMIC_ANNOTATIONS_EXTERNAL_IMPL=1', |
3018 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1', | 3027 'WTF_USE_DYNAMIC_ANNOTATIONS_NOIMPL=1', |
3019 ], | 3028 ], |
3020 'target_conditions': [ | 3029 'target_conditions': [ |
3021 ['_type=="executable"', { | 3030 ['_type=="executable"', { |
3022 'ldflags': [ | 3031 'ldflags': [ |
3023 '-pie', | 3032 '-pie', |
3024 ], | 3033 ], |
3025 }], | 3034 }], |
3026 ], | 3035 ], |
3027 }], | 3036 }], |
3028 ], | 3037 ], |
3029 }], | 3038 }], |
3030 ['msan==1', { | 3039 ['msan==1', { |
3031 'target_conditions': [ | 3040 'target_conditions': [ |
3032 ['_toolset=="target"', { | 3041 ['_toolset=="target"', { |
3033 'cflags': [ | 3042 'cflags': [ |
3034 '-fsanitize=memory', | 3043 '-fsanitize=memory', |
3035 '-fsanitize-memory-track-origins', | 3044 '-fsanitize-memory-track-origins', |
3036 '-fno-omit-frame-pointer', | |
3037 '-fPIC', | 3045 '-fPIC', |
3038 ], | 3046 ], |
3039 'ldflags': [ | 3047 'ldflags': [ |
3040 '-fsanitize=memory', | 3048 '-fsanitize=memory', |
3041 ], | 3049 ], |
3042 'defines': [ | 3050 'defines': [ |
3043 'MEMORY_SANITIZER', | 3051 'MEMORY_SANITIZER', |
3044 ], | 3052 ], |
3045 'target_conditions': [ | 3053 'target_conditions': [ |
3046 ['_type=="executable"', { | 3054 ['_type=="executable"', { |
(...skipping 1207 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4254 # settings in target dicts. SYMROOT is a special case, because many other | 4262 # settings in target dicts. SYMROOT is a special case, because many other |
4255 # Xcode variables depend on it, including variables such as | 4263 # Xcode variables depend on it, including variables such as |
4256 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something | 4264 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something |
4257 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the | 4265 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the |
4258 # files to appear (when present) in the UI as actual files and not red | 4266 # files to appear (when present) in the UI as actual files and not red |
4259 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, | 4267 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, |
4260 # and therefore SYMROOT, needs to be set at the project level. | 4268 # and therefore SYMROOT, needs to be set at the project level. |
4261 'SYMROOT': '<(DEPTH)/xcodebuild', | 4269 'SYMROOT': '<(DEPTH)/xcodebuild', |
4262 }, | 4270 }, |
4263 } | 4271 } |
OLD | NEW |