Use a Soong config variable to toggle between ART Module source and
prebuilts.

When ART Module prebuilts are in use (i.e. have prefer:true), they
interfere with apex/sdk/module_exports modules and cause Soong
failures.

To work around that problem the aim is to disable those modules when
the prebuilts are preferred, and introduce a product variable to toggle
it the other way. That variable is then set in ART-specific products
which should be used in ART source builds.

That way platform builds will use the prebuilts even if ART sources are
available, without disabling all the ART source modules.

This topic does all the preparations for that except the actual flip to
start using prebuilts by default.

Test: m SKIP_BOOT_JARS_CHECK=true \
      UNSAFE_DISABLE_HIDDENAPI_FLAGS=true nothing
  on AOSP master with dexpreopting disabled and the default flipped to
  use prebuilts
Test: art/build/build-art-module.sh
      art/build/apex/runtests.sh
      art/tools/buildbot-build.sh {--host,--target}
      art/tools/run-gtests.sh (in device chroot)
      art/test/testrunner/testrunner.py --target --64 --optimizing
        (in device chroot)
  on master-art with the default flipped to use prebuilts
Test: Use NINJA_ARGS="-t query ..." to check the dependencies of
  art-runtime both when APEXes are enabled and disabled.
Bug: 172480617
Change-Id: I1126e7dc40ab55fca1df0043199da5cb449de14d
7 files changed