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

Unified Diff: gypfiles/standalone.gypi

Issue 2498223004: [build] Add build options for uftrace support
Patch Set: build: Add build options for uftrace support Created 4 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « Makefile ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: gypfiles/standalone.gypi
diff --git a/gypfiles/standalone.gypi b/gypfiles/standalone.gypi
index d438a5aeab992e3d09e86c109e1944829218a8e5..0626e8995c42134f0ddda447190c00a66b8dbcf5 100644
--- a/gypfiles/standalone.gypi
+++ b/gypfiles/standalone.gypi
@@ -114,6 +114,8 @@
'v8_target_arch%': '<(target_arch)',
'coverage%': '<(coverage)',
'sysroot%': '<(sysroot)',
+ 'pg%': 0,
+ 'finstrument%': 0,
'asan%': 0,
'lsan%': 0,
'msan%': 0,
@@ -194,6 +196,8 @@
'werror%': '-Werror',
'use_goma%': '<(use_goma)',
'gomadir%': '<(gomadir)',
+ 'pg%': '<(pg)',
+ 'finstrument%': '<(finstrument)',
'asan%': '<(asan)',
'lsan%': '<(lsan)',
'msan%': '<(msan)',
@@ -594,6 +598,37 @@
['os_posix==1 and OS!="mac"', {
'target_defaults': {
'conditions': [
+ # Binaries compiled with -pg option can be traced with uftrace.
+ ['pg==1', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'cflags': [
+ '-pg',
+ '-fno-omit-frame-pointer',
+ ],
+ 'ldflags': [
+ '-pg',
+ '-fno-omit-frame-pointer',
+ ],
+ }],
+ ],
+ }],
+ # Binaries compiled with -finstrument-functions option can be traced
+ # with uftrace.
+ ['finstrument==1', {
+ 'target_conditions': [
+ ['_toolset=="target"', {
+ 'cflags': [
+ '-finstrument-functions',
+ '-fno-omit-frame-pointer',
+ ],
+ 'ldflags': [
+ '-finstrument-functions',
+ '-fno-omit-frame-pointer',
+ ],
+ }],
+ ],
+ }],
# Common options for AddressSanitizer, LeakSanitizer,
# ThreadSanitizer, MemorySanitizer and CFI builds.
['asan==1 or lsan==1 or tsan==1 or msan==1 or cfi_vptr==1', {
« no previous file with comments | « Makefile ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698