Only do some checks when compiling against the core image.

This will avoid false negatives when running dex2oatd on apks.

bug:21865473

(cherry picked from commit 335005e2b3a179f26b7a8ae64ca60a1406b669bd)

Change-Id: Iac6dbe30c9d576077a0384b88696f79937d89471
3 files changed