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

Side by Side Diff: build/common.gypi

Issue 985713005: Introduce cfi_vptr build flag. (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 9 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 | « no previous file | no next file » | 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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after
639 'use_lto%': 0, 639 'use_lto%': 0,
640 # Enable LTO on code compiled with -O2. 640 # Enable LTO on code compiled with -O2.
641 'use_lto_o2%': 0, 641 'use_lto_o2%': 0,
642 642
643 # Allowed level of identical code folding in the gold linker. 643 # Allowed level of identical code folding in the gold linker.
644 'gold_icf_level%': 'safe', 644 'gold_icf_level%': 'safe',
645 645
646 # Libxkbcommon usage. 646 # Libxkbcommon usage.
647 'use_xkbcommon%': 0, 647 'use_xkbcommon%': 0,
648 648
649 # Control Flow Integrity for virtual calls.
650 # See http://clang.llvm.org/docs/ControlFlowIntegrity.html
651 'cfi_vptr%': 0,
652
649 'conditions': [ 653 'conditions': [
650 # A flag for POSIX platforms 654 # A flag for POSIX platforms
651 ['OS=="win"', { 655 ['OS=="win"', {
652 'os_posix%': 0, 656 'os_posix%': 0,
653 }, { 657 }, {
654 'os_posix%': 1, 658 'os_posix%': 1,
655 }], 659 }],
656 660
657 # A flag for BSD platforms 661 # A flag for BSD platforms
658 ['OS=="freebsd" or OS=="openbsd"', { 662 ['OS=="freebsd" or OS=="openbsd"', {
(...skipping 554 matching lines...) Expand 10 before | Expand all | Expand 10 after
1213 'v8_optimized_debug%': '<(v8_optimized_debug)', 1217 'v8_optimized_debug%': '<(v8_optimized_debug)',
1214 'proprietary_codecs%': '<(proprietary_codecs)', 1218 'proprietary_codecs%': '<(proprietary_codecs)',
1215 'use_goma%': '<(use_goma)', 1219 'use_goma%': '<(use_goma)',
1216 'gomadir%': '<(gomadir)', 1220 'gomadir%': '<(gomadir)',
1217 'use_lto%': '<(use_lto)', 1221 'use_lto%': '<(use_lto)',
1218 'use_lto_o2%': '<(use_lto_o2)', 1222 'use_lto_o2%': '<(use_lto_o2)',
1219 'gold_icf_level%': '<(gold_icf_level)', 1223 'gold_icf_level%': '<(gold_icf_level)',
1220 'video_hole%': '<(video_hole)', 1224 'video_hole%': '<(video_hole)',
1221 'support_pre_M6_history_database%': '<(support_pre_M6_history_database)', 1225 'support_pre_M6_history_database%': '<(support_pre_M6_history_database)',
1222 'v8_use_external_startup_data%': '<(v8_use_external_startup_data)', 1226 'v8_use_external_startup_data%': '<(v8_use_external_startup_data)',
1227 'cfi_vptr%': '<(cfi_vptr)',
1223 1228
1224 # Use system protobuf instead of bundled one. 1229 # Use system protobuf instead of bundled one.
1225 'use_system_protobuf%': 0, 1230 'use_system_protobuf%': 0,
1226 1231
1227 # Use system yasm instead of bundled one. 1232 # Use system yasm instead of bundled one.
1228 'use_system_yasm%': 0, 1233 'use_system_yasm%': 0,
1229 1234
1230 # Use system ICU instead of bundled one. 1235 # Use system ICU instead of bundled one.
1231 'use_system_icu%' : 0, 1236 'use_system_icu%' : 0,
1232 1237
(...skipping 1755 matching lines...) Expand 10 before | Expand all | Expand 10 after
2988 }], 2993 }],
2989 ['enable_ipc_fuzzer==1', { 2994 ['enable_ipc_fuzzer==1', {
2990 'defines': ['ENABLE_IPC_FUZZER=1'], 2995 'defines': ['ENABLE_IPC_FUZZER=1'],
2991 }], 2996 }],
2992 ['video_hole==1', { 2997 ['video_hole==1', {
2993 'defines': ['VIDEO_HOLE=1'], 2998 'defines': ['VIDEO_HOLE=1'],
2994 }], 2999 }],
2995 ['v8_use_external_startup_data==1', { 3000 ['v8_use_external_startup_data==1', {
2996 'defines': ['V8_USE_EXTERNAL_STARTUP_DATA'], 3001 'defines': ['V8_USE_EXTERNAL_STARTUP_DATA'],
2997 }], 3002 }],
2998 ['use_lto==1 and (target_arch=="ia32" or target_arch=="x64")', { 3003 ['(use_lto==1 or cfi_vptr==1) and (target_arch=="ia32" or target_arch=="x6 4")', {
Nico 2015/03/06 21:13:25 alternatively use_lto could be set to 1 automatica
2999 # Required for third_party/zlib/crc_folding.c and various other code 3004 # Required for third_party/zlib/crc_folding.c and various other code
3000 # that uses SSE. TODO(pcc): Remove this once we properly support 3005 # that uses SSE. TODO(pcc): Remove this once we properly support
3001 # subtarget specific code generation in LLVM. 3006 # subtarget specific code generation in LLVM.
3002 'ldflags': ['-Wl,-plugin-opt,mcpu=corei7-avx'], 3007 'ldflags': ['-Wl,-plugin-opt,mcpu=corei7-avx'],
3003 }], 3008 }],
3004 ], # conditions for 'target_defaults' 3009 ], # conditions for 'target_defaults'
3005 'target_conditions': [ 3010 'target_conditions': [
3006 ['<(use_libpci)==1', { 3011 ['<(use_libpci)==1', {
3007 'defines': ['USE_LIBPCI=1'], 3012 'defines': ['USE_LIBPCI=1'],
3008 }], 3013 }],
(...skipping 2887 matching lines...) Expand 10 before | Expand all | Expand 10 after
5896 'target_defaults': { 5901 'target_defaults': {
5897 'target_conditions': [ 5902 'target_conditions': [
5898 ['_toolset=="target"', { 5903 ['_toolset=="target"', {
5899 'cflags': [ 5904 'cflags': [
5900 '-ffat-lto-objects', 5905 '-ffat-lto-objects',
5901 ], 5906 ],
5902 }], 5907 }],
5903 ], 5908 ],
5904 }, 5909 },
5905 }], 5910 }],
5906 ['use_lto==1 and clang==1', { 5911 ['(use_lto==1 or cfi_vptr==1) and clang==1', {
5907 'target_defaults': { 5912 'target_defaults': {
5908 'target_conditions': [ 5913 'target_conditions': [
5909 ['_toolset=="target"', { 5914 ['_toolset=="target"', {
5910 'arflags': [ 5915 'arflags': [
5911 '--plugin', '../../<(make_clang_dir)/lib/LLVMgold.so', 5916 '--plugin', '../../<(make_clang_dir)/lib/LLVMgold.so',
5912 ], 5917 ],
5913 }], 5918 }],
5914 ], 5919 ],
5915 }, 5920 },
5916 }], 5921 }],
(...skipping 12 matching lines...) Expand all
5929 'target_defaults': { 5934 'target_defaults': {
5930 'target_conditions': [ 5935 'target_conditions': [
5931 ['_toolset=="target"', { 5936 ['_toolset=="target"', {
5932 'ldflags': [ 5937 'ldflags': [
5933 '-flto', 5938 '-flto',
5934 ], 5939 ],
5935 }], 5940 }],
5936 ], 5941 ],
5937 }, 5942 },
5938 }], 5943 }],
5944 ['cfi_vptr==1', {
5945 'target_defaults': {
5946 'target_conditions': [
5947 ['_toolset=="target"', {
5948 'cflags': [
5949 '-fsanitize=cfi-vptr',
5950 ],
5951 'ldflags': [
5952 '-fsanitize=cfi-vptr',
5953 ],
5954 }],
5955 ],
5956 },
5957 }],
5939 ], 5958 ],
5940 'xcode_settings': { 5959 'xcode_settings': {
5941 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! 5960 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT!
5942 # This block adds *project-wide* configuration settings to each project 5961 # This block adds *project-wide* configuration settings to each project
5943 # file. It's almost always wrong to put things here. Specify your 5962 # file. It's almost always wrong to put things here. Specify your
5944 # custom xcode_settings in target_defaults to add them to targets instead. 5963 # custom xcode_settings in target_defaults to add them to targets instead.
5945 5964
5946 'conditions': [ 5965 'conditions': [
5947 # In an Xcode Project Info window, the "Base SDK for All Configurations" 5966 # In an Xcode Project Info window, the "Base SDK for All Configurations"
5948 # setting sets the SDK on a project-wide basis. In order to get the 5967 # setting sets the SDK on a project-wide basis. In order to get the
(...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after
5999 # settings in target dicts. SYMROOT is a special case, because many other 6018 # settings in target dicts. SYMROOT is a special case, because many other
6000 # Xcode variables depend on it, including variables such as 6019 # Xcode variables depend on it, including variables such as
6001 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 6020 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something
6002 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the 6021 # like PROJECT_DERIVED_FILE_DIR is added to a project, in order for the
6003 # files to appear (when present) in the UI as actual files and not red 6022 # files to appear (when present) in the UI as actual files and not red
6004 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR, 6023 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
6005 # and therefore SYMROOT, needs to be set at the project level. 6024 # and therefore SYMROOT, needs to be set at the project level.
6006 'SYMROOT': '<(DEPTH)/xcodebuild', 6025 'SYMROOT': '<(DEPTH)/xcodebuild',
6007 }, 6026 },
6008 } 6027 }
OLDNEW
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698