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

Side by Side Diff: build/common.gypi

Issue 2131423002: Implement use_cfi_cast to optionally enable cast checks. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Localize CFI_CAST_CHECK define Created 4 years, 5 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
« no previous file with comments | « base/tools_sanity_unittest.cc ('k') | build/config/sanitizers/BUILD.gn » ('j') | 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 680 matching lines...) Expand 10 before | Expand all | Expand 10 after
691 691
692 # Libxkbcommon usage. 692 # Libxkbcommon usage.
693 'use_xkbcommon%': 0, 693 'use_xkbcommon%': 0,
694 694
695 # Whether we use GTKv3 on linux. 695 # Whether we use GTKv3 on linux.
696 'use_gtk3%': 0, 696 'use_gtk3%': 0,
697 697
698 # Control Flow Integrity for virtual calls and casts. 698 # Control Flow Integrity for virtual calls and casts.
699 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html 699 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html
700 'cfi_vptr%': 0, 700 'cfi_vptr%': 0,
701 # TODO(krasin): remove it. See https://crbug.com/626794.
702 'cfi_cast%': 0,
701 'cfi_diag%': 0, 703 'cfi_diag%': 0,
702 704
703 'cfi_blacklist%': '<(PRODUCT_DIR)/../../tools/cfi/blacklist.txt', 705 'cfi_blacklist%': '<(PRODUCT_DIR)/../../tools/cfi/blacklist.txt',
704 706
705 # Whether the entire browser uses toolkit-views on Mac instead of Cocoa. 707 # Whether the entire browser uses toolkit-views on Mac instead of Cocoa.
706 'mac_views_browser%': 0, 708 'mac_views_browser%': 0,
707 709
708 # By default, use ICU data file (icudtl.dat). 710 # By default, use ICU data file (icudtl.dat).
709 'icu_use_data_file_flag%': 1, 711 'icu_use_data_file_flag%': 1,
710 712
(...skipping 541 matching lines...) Expand 10 before | Expand all | Expand 10 after
1252 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension) ', 1254 'enable_hangout_services_extension%' : '<(enable_hangout_services_extension) ',
1253 'proprietary_codecs%': '<(proprietary_codecs)', 1255 'proprietary_codecs%': '<(proprietary_codecs)',
1254 'use_goma%': '<(use_goma)', 1256 'use_goma%': '<(use_goma)',
1255 'gomadir%': '<(gomadir)', 1257 'gomadir%': '<(gomadir)',
1256 'use_lto%': '<(use_lto)', 1258 'use_lto%': '<(use_lto)',
1257 'use_lto_o2%': '<(use_lto_o2)', 1259 'use_lto_o2%': '<(use_lto_o2)',
1258 'gold_icf_level%': '<(gold_icf_level)', 1260 'gold_icf_level%': '<(gold_icf_level)',
1259 'video_hole%': '<(video_hole)', 1261 'video_hole%': '<(video_hole)',
1260 'v8_use_external_startup_data%': '<(v8_use_external_startup_data)', 1262 'v8_use_external_startup_data%': '<(v8_use_external_startup_data)',
1261 'cfi_vptr%': '<(cfi_vptr)', 1263 'cfi_vptr%': '<(cfi_vptr)',
1264 'cfi_cast%': '<(cfi_cast)',
1262 'cfi_diag%': '<(cfi_diag)', 1265 'cfi_diag%': '<(cfi_diag)',
1263 'cfi_blacklist%': '<(cfi_blacklist)', 1266 'cfi_blacklist%': '<(cfi_blacklist)',
1264 'mac_views_browser%': '<(mac_views_browser)', 1267 'mac_views_browser%': '<(mac_views_browser)',
1265 'android_app_version_name%': '<(android_app_version_name)', 1268 'android_app_version_name%': '<(android_app_version_name)',
1266 'android_app_version_code%': '<(android_app_version_code)', 1269 'android_app_version_code%': '<(android_app_version_code)',
1267 'use_webview_internal_framework%': '<(use_webview_internal_framework)', 1270 'use_webview_internal_framework%': '<(use_webview_internal_framework)',
1268 'enable_webvr%': '<(enable_webvr)', 1271 'enable_webvr%': '<(enable_webvr)',
1269 1272
1270 # Turns on compiler optimizations in V8 in Debug build. 1273 # Turns on compiler optimizations in V8 in Debug build.
1271 'v8_optimized_debug%': 1, 1274 'v8_optimized_debug%': 1,
(...skipping 4933 matching lines...) Expand 10 before | Expand all | Expand 10 after
6205 }], 6208 }],
6206 ], 6209 ],
6207 }, 6210 },
6208 }], 6211 }],
6209 ['cfi_vptr==1', { 6212 ['cfi_vptr==1', {
6210 'target_defaults': { 6213 'target_defaults': {
6211 'target_conditions': [ 6214 'target_conditions': [
6212 ['_toolset=="target"', { 6215 ['_toolset=="target"', {
6213 'cflags': [ 6216 'cflags': [
6214 '-fsanitize=cfi-vcall', 6217 '-fsanitize=cfi-vcall',
6215 '-fsanitize=cfi-derived-cast',
6216 '-fsanitize=cfi-unrelated-cast',
6217 '-fsanitize-blacklist=<(cfi_blacklist)', 6218 '-fsanitize-blacklist=<(cfi_blacklist)',
6218 ], 6219 ],
6219 'ldflags': [ 6220 'ldflags': [
6220 '-fsanitize=cfi-vcall', 6221 '-fsanitize=cfi-vcall',
6221 '-fsanitize=cfi-derived-cast', 6222 '-fsanitize=cfi-derived-cast',
6222 '-fsanitize=cfi-unrelated-cast', 6223 '-fsanitize=cfi-unrelated-cast',
6223 ], 6224 ],
6224 'xcode_settings': { 6225 'xcode_settings': {
6225 'OTHER_CFLAGS': [ 6226 'OTHER_CFLAGS': [
6226 '-fsanitize=cfi-vcall', 6227 '-fsanitize=cfi-vcall',
6227 '-fsanitize=cfi-derived-cast',
6228 '-fsanitize=cfi-unrelated-cast',
6229 '-fsanitize-blacklist=<(cfi_blacklist)', 6228 '-fsanitize-blacklist=<(cfi_blacklist)',
6230 ], 6229 ],
6231 }, 6230 },
6232 }], 6231 }],
6233 ['_toolset=="target" and _type!="static_library"', { 6232 ['_toolset=="target" and _type!="static_library"', {
6234 'xcode_settings': { 6233 'xcode_settings': {
6235 'OTHER_LDFLAGS': [ 6234 'OTHER_LDFLAGS': [
6236 '-fsanitize=cfi-vcall', 6235 '-fsanitize=cfi-vcall',
6236 ],
6237 },
6238 }],
6239 ],
6240 },
6241 }],
6242 ['cfi_vptr==1 and cfi_cast==1', {
6243 'target_defaults': {
6244 'target_conditions': [
6245 ['_toolset=="target"', {
6246 'cflags': [
6247 '-fsanitize=cfi-derived-cast',
6248 '-fsanitize=cfi-unrelated-cast',
6249 ],
6250 'ldflags': [
6251 '-fsanitize=cfi-derived-cast',
6252 '-fsanitize=cfi-unrelated-cast',
6253 ],
6254 'xcode_settings': {
6255 'OTHER_CFLAGS': [
6237 '-fsanitize=cfi-derived-cast', 6256 '-fsanitize=cfi-derived-cast',
6238 '-fsanitize=cfi-unrelated-cast', 6257 '-fsanitize=cfi-unrelated-cast',
6239 ], 6258 ],
6259 },
6260 }],
6261 ['_toolset=="target" and _type!="static_library"', {
6262 'xcode_settings': {
6263 'OTHER_LDFLAGS': [
6264 '-fsanitize=cfi-derived-cast',
6265 '-fsanitize=cfi-unrelated-cast',
6266 ],
6240 }, 6267 },
6241 }], 6268 }],
6242 ], 6269 ],
6243 }, 6270 },
6244 }], 6271 }],
6245 ['cfi_vptr==1 and OS=="win"', { 6272 ['cfi_vptr==1 and OS=="win"', {
6246 'target_defaults': { 6273 'target_defaults': {
6247 'target_conditions': [ 6274 'target_conditions': [
6248 ['_toolset=="target"', { 6275 ['_toolset=="target"', {
6249 'msvs_settings': { 6276 'msvs_settings': {
(...skipping 66 matching lines...) Expand 10 before | Expand all | Expand 10 after
6316 # settings in target dicts. SYMROOT is a special case, because many other 6343 # settings in target dicts. SYMROOT is a special case, because many other
6317 # Xcode variables depend on it, including variables such as 6344 # Xcode variables depend on it, including variables such as
6318 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 6345 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
6319 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 6346 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
6320 # files to appear (when present) in the UI as actual files and not red 6347 # files to appear (when present) in the UI as actual files and not red
6321 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 6348 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
6322 # and therefore SYMROOT, needs to be set at the project level. 6349 # and therefore SYMROOT, needs to be set at the project level.
6323 'SYMROOT': '<(DEPTH)/xcodebuild', 6350 'SYMROOT': '<(DEPTH)/xcodebuild',
6324 }, 6351 },
6325 } 6352 }
OLDNEW
« no previous file with comments | « base/tools_sanity_unittest.cc ('k') | build/config/sanitizers/BUILD.gn » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698