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

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
Index: build/config/android/BUILD.gn
diff --git a/build/config/android/BUILD.gn b/build/config/android/BUILD.gn
index 5492693f560fc02885b96524070503f9e7f0cf07..b2d144cd9515f9694a56b2a8b93a273532cbbd55 100644
--- a/build/config/android/BUILD.gn
+++ b/build/config/android/BUILD.gn
@@ -30,3 +30,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_finstrument_functions" config on
+# targets by default. You can override whether the "-finstrument-functions"
+# compiler flag is used on a per-target basis:
+#
+# configs -= [ "//build/config/android:default_finstrument_functions" ]
+# configs += [ "//build/config/android:no_finstrument_functions" ]
+
+config("default_finstrument_functions") {
agrieve 2015/09/23 19:20:48 "finstrument" is a bit of a funny word. Maybe just
+ configs = []
agrieve 2015/09/23 19:20:48 nit: remove the empty list initialization and use:
+ if (order_profiling) {
+ configs += [ ":finstrument_functions" ]
+ } else {
+ configs += [ ":no_finstrument_functions" ]
+ }
+}
+
+config("finstrument_functions") {
+ 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",
+ ]
+}
+
+config("no_finstrument_functions") {
+}

Powered by Google App Engine
This is Rietveld 408576698