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

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: Set use_lto=1 automatically if cfi_vptr is 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 1140 matching lines...) Expand 10 before | Expand all | Expand 10 after
2373 # Do not disable seccomp_bpf anywhere without talking to 2378 # Do not disable seccomp_bpf anywhere without talking to
2374 # security@chromium.org! 2379 # security@chromium.org!
2375 ['((OS=="linux" or OS=="android") and ' 2380 ['((OS=="linux" or OS=="android") and '
2376 '(target_arch=="ia32" or target_arch=="x64" or ' 2381 '(target_arch=="ia32" or target_arch=="x64" or '
2377 'target_arch=="arm" or target_arch=="mipsel" or ' 2382 'target_arch=="arm" or target_arch=="mipsel" or '
2378 'target_arch=="arm64"))', { 2383 'target_arch=="arm64"))', {
2379 'use_seccomp_bpf%': 1, 2384 'use_seccomp_bpf%': 1,
2380 }, { 2385 }, {
2381 'use_seccomp_bpf%': 0, 2386 'use_seccomp_bpf%': 0,
2382 }], 2387 }],
2388
2389 ['cfi_vptr==1', {
2390 'use_lto%': 1,
2391 }],
2383 ], 2392 ],
2384 2393
2385 # older history files use fts2 instead of fts3 2394 # older history files use fts2 instead of fts3
2386 'sqlite_enable_fts2%': '<(support_pre_M6_history_database)', 2395 'sqlite_enable_fts2%': '<(support_pre_M6_history_database)',
2387 2396
2388 # The path to the ANGLE library. 2397 # The path to the ANGLE library.
2389 'angle_path': '<(DEPTH)/third_party/angle', 2398 'angle_path': '<(DEPTH)/third_party/angle',
2390 2399
2391 # List of default apps to install in new profiles. The first list contains 2400 # List of default apps to install in new profiles. The first list contains
2392 # the source files as found in svn. The second list, used only for linux, 2401 # the source files as found in svn. The second list, used only for linux,
(...skipping 3536 matching lines...) Expand 10 before | Expand all | Expand 10 after
5929 'target_defaults': { 5938 'target_defaults': {
5930 'target_conditions': [ 5939 'target_conditions': [
5931 ['_toolset=="target"', { 5940 ['_toolset=="target"', {
5932 'ldflags': [ 5941 'ldflags': [
5933 '-flto', 5942 '-flto',
5934 ], 5943 ],
5935 }], 5944 }],
5936 ], 5945 ],
5937 }, 5946 },
5938 }], 5947 }],
5948 ['cfi_vptr==1', {
5949 'target_defaults': {
5950 'target_conditions': [
5951 ['_toolset=="target"', {
5952 'cflags': [
5953 '-fsanitize=cfi-vptr',
5954 ],
5955 'ldflags': [
5956 '-fsanitize=cfi-vptr',
5957 ],
5958 }],
5959 ],
5960 },
5961 }],
5939 ], 5962 ],
5940 'xcode_settings': { 5963 'xcode_settings': {
5941 # DON'T ADD ANYTHING NEW TO THIS BLOCK UNLESS YOU REALLY REALLY NEED IT! 5964 # 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 5965 # This block adds *project-wide* configuration settings to each project
5943 # file. It's almost always wrong to put things here. Specify your 5966 # 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. 5967 # custom xcode_settings in target_defaults to add them to targets instead.
5945 5968
5946 'conditions': [ 5969 'conditions': [
5947 # In an Xcode Project Info window, the "Base SDK for All Configurations" 5970 # 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 5971 # 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 6022 # settings in target dicts. SYMROOT is a special case, because many other
6000 # Xcode variables depend on it, including variables such as 6023 # Xcode variables depend on it, including variables such as
6001 # PROJECT_DERIVED_FILE_DIR. When a source group corresponding to something 6024 # 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 6025 # 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 6026 # 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, 6027 # red "missing file" proxies, the correct path to PROJECT_DERIVED_FILE_DIR,
6005 # and therefore SYMROOT, needs to be set at the project level. 6028 # and therefore SYMROOT, needs to be set at the project level.
6006 'SYMROOT': '<(DEPTH)/xcodebuild', 6029 'SYMROOT': '<(DEPTH)/xcodebuild',
6007 }, 6030 },
6008 } 6031 }
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