0

I am developing an Android app which uses native c++ code with ndk.

It is very important that this code runs as fast and efficient as possible. Any tips here? Is there a way to set the -o3 flag for instance in the Android.mk file?

Thanks!

dorien
  • 5,265
  • 10
  • 57
  • 116

1 Answers1

2

yep, just add LOCAL_CFLAGS := -O2 for C/C++ code

or LOCAL_CPPFLAGS for C++ code. these go in our Android.mk file.

Shark
  • 6,513
  • 3
  • 28
  • 50