Chromium Code Reviews| 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") { |
| +} |