Chromium Code Reviews| Index: build/common.gypi |
| diff --git a/build/common.gypi b/build/common.gypi |
| index cdefdd1a8ecd9d239aef8e77a78b93cb3db7d44b..9dfe2894bf446394cb2f9fb8706944018d3cadcd 100644 |
| --- a/build/common.gypi |
| +++ b/build/common.gypi |
| @@ -698,6 +698,8 @@ |
| # Control Flow Integrity for virtual calls and casts. |
| # See http://clang.llvm.org/docs/ControlFlowIntegrity.html |
| 'cfi_vptr%': 0, |
| + # TODO(krasin): remove it. See https://crbug.com/626794. |
| + 'cfi_cast%': 0, |
| 'cfi_diag%': 0, |
| 'cfi_blacklist%': '<(PRODUCT_DIR)/../../tools/cfi/blacklist.txt', |
| @@ -1259,6 +1261,7 @@ |
| 'video_hole%': '<(video_hole)', |
| 'v8_use_external_startup_data%': '<(v8_use_external_startup_data)', |
| 'cfi_vptr%': '<(cfi_vptr)', |
| + 'cfi_cast%': '<(cfi_cast)', |
| 'cfi_diag%': '<(cfi_diag)', |
| 'cfi_blacklist%': '<(cfi_blacklist)', |
| 'mac_views_browser%': '<(mac_views_browser)', |
| @@ -6212,8 +6215,6 @@ |
| ['_toolset=="target"', { |
| 'cflags': [ |
| '-fsanitize=cfi-vcall', |
| - '-fsanitize=cfi-derived-cast', |
| - '-fsanitize=cfi-unrelated-cast', |
| '-fsanitize-blacklist=<(cfi_blacklist)', |
| ], |
| 'ldflags': [ |
| @@ -6224,8 +6225,6 @@ |
| 'xcode_settings': { |
| 'OTHER_CFLAGS': [ |
| '-fsanitize=cfi-vcall', |
| - '-fsanitize=cfi-derived-cast', |
| - '-fsanitize=cfi-unrelated-cast', |
| '-fsanitize-blacklist=<(cfi_blacklist)', |
| ], |
| }, |
| @@ -6234,6 +6233,38 @@ |
| 'xcode_settings': { |
| 'OTHER_LDFLAGS': [ |
| '-fsanitize=cfi-vcall', |
| + ], |
| + }, |
| + }], |
| + ], |
| + }, |
| + }], |
| + ['cfi_vptr==1 and cfi_cast==1', { |
| + 'target_defaults': { |
| + 'target_conditions': [ |
| + ['_toolset=="target"', { |
| + 'defines': [ |
| + # TODO(krasin): remove CFI_CAST_CHECK, see https://crbug.com/626794. |
| + 'CFI_CAST_CHECK', |
|
Nico
2016/07/12 23:23:59
do we really have to globally add a define to ever
krasin1
2016/07/13 00:02:51
Done.
|
| + ], |
| + 'cflags': [ |
| + '-fsanitize=cfi-derived-cast', |
| + '-fsanitize=cfi-unrelated-cast', |
| + ], |
| + 'ldflags': [ |
| + '-fsanitize=cfi-derived-cast', |
| + '-fsanitize=cfi-unrelated-cast', |
| + ], |
| + 'xcode_settings': { |
| + 'OTHER_CFLAGS': [ |
| + '-fsanitize=cfi-derived-cast', |
| + '-fsanitize=cfi-unrelated-cast', |
| + ], |
| + }, |
| + }], |
| + ['_toolset=="target" and _type!="static_library"', { |
| + 'xcode_settings': { |
| + 'OTHER_LDFLAGS': [ |
| '-fsanitize=cfi-derived-cast', |
| '-fsanitize=cfi-unrelated-cast', |
| ], |