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

Unified Diff: build/config/android/BUILD.gn

Issue 1363793002: Port the order_profiling GYP flag to GN (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Created 5 years, 3 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | build/config/android/config.gni » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: build/config/android/BUILD.gn
diff --git a/build/config/android/BUILD.gn b/build/config/android/BUILD.gn
index db6b7a8bb8d3175e1560f4cf087cf1b4ec535157..0503bef1e1f3edd4ef79313dbbb37deeab1d87d5 100644
--- a/build/config/android/BUILD.gn
+++ b/build/config/android/BUILD.gn
@@ -222,3 +222,37 @@ config("hide_native_jni_exports") {
ldflags = [ "-Wl,--version-script=" +
rebase_path("//build/android/android_no_jni_exports.lst") ]
}
+
+# Instrumentation -------------------------------------------------------------
+#
+# The BUILDCONFIG file sets the "default_cygprofile_instrumentation" config on
+# targets by default. You can override whether the cygprofile instrumentation is
+# used on a per-target basis:
+#
+# configs -= [ "//build/config/android:default_cygprofile_instrumentation" ]
+# configs += [ "//build/config/android:no_cygprofile_instrumentation" ]
+
+config("default_cygprofile_instrumentation") {
+ if (use_order_profiling) {
+ configs = [ ":cygprofile_instrumentation" ]
+ } else {
+ configs = [ ":no_cygprofile_instrumentation" ]
+ }
+}
+
+config("cygprofile_instrumentation") {
+ cflags = [
+ "-finstrument-functions",
+
+ # Allow mmx intrinsics to inline, so that the compiler can expand the intrinsics.
+ "-finstrument-functions-exclude-file-list=mmintrin.h",
+
+ # Avoid errors with current NDK:
+ # "third_party/android_tools/ndk/toolchains/arm-linux-androideabi-4.6/prebuilt/linux-x86_64/bin/../lib/gcc/arm-linux-androideabi/4.6/include/arm_neon.h:3426:3: error: argument must be a constant"
+ "-finstrument-functions-exclude-file-list=arm_neon.h,SaturatedArithmeticARM.h",
+ ]
+ defines = [ "CYGPROFILE_INSTRUMENTATION=1" ]
+}
+
+config("no_cygprofile_instrumentation") {
+}
« no previous file with comments | « build/config/BUILDCONFIG.gn ('k') | build/config/android/config.gni » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698