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

Unified Diff: BUILD.gn

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 | « no previous file | Makefile » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: BUILD.gn
diff --git a/BUILD.gn b/BUILD.gn
index 30b5d5a57451790e53718e671926d677fd681daf..532ed2e3efa45eade0f79ff7bfcd2413df2e3658 100644
--- a/BUILD.gn
+++ b/BUILD.gn
@@ -69,6 +69,13 @@ declare_args() {
# Similar to the ARM hard float ABI but on MIPS.
v8_use_mips_abi_hardfloat = true
+
+ # Build with -pg option for gprof or uftrace
+ v8_pg_build = false
+
+ # Build with -finstrument-functions option for uftrace or general function
+ # instrumentation
+ v8_finstrument_build = false
}
# Set project-specific defaults for some args if not provided in args.gn. The
@@ -371,6 +378,20 @@ config("toolchain") {
]
}
+ if (v8_pg_build) {
+ cflags += [
+ "-pg",
+ "-fno-omit-frame-pointer",
+ ]
+ }
+
+ if (v8_finstrument_build) {
+ cflags += [
+ "-finstrument-functions",
+ "-fno-omit-frame-pointer",
+ ]
+ }
+
if (is_clang) {
cflags += [
"-Wsign-compare",
« no previous file with comments | « no previous file | Makefile » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698