0

I want to know if I can define C language macro in Android.bp file ? I am wrapping unit tests of some modules (which are written in C++) into VTS framework. There are certain changes which needs to be protected under macro.

1 Answers1

0

You could add a define to the cflags in your Android.bp to be checked in your test code.

cc_binary {
    [...]
    cflags: [ "-DMYUNITTEST" ]
}
#ifndef MYUNITTEST
// not to be used in this unittest.
#endif
Simpl
  • 1,938
  • 1
  • 10
  • 21