Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit c9b4c422 authored by Nelson Li's avatar Nelson Li
Browse files

build: soong: Expose ART build flags to Soong config

To allow Soong-native modules (.bp) to respect legacy ART build
configurations, certain Make variables need to be exposed to Soong.
Currently, build logic conditional on ART_BUILD_TARGET cannot be
replicated in a .bp file.

This change introduces two new boolean Soong config variables in the
'art_module' namespace:
 - art_build_target
 - art_build_host

These variables precisely mirror the logic from
art/build/Android.common_build.mk, evaluating to true unless both
their NDEBUG and DEBUG counterparts are explicitly 'false'.

This enables Soong modules to use these flags in `select` statements,
making it possible to define conditional phony targets like
'art_target_gtest_all_deps'.

Bug: 395776750
Test: 1. Add select(soong_config_variable("art_module", "art_build_target")
         in Android.bp
      2. export ART_BUILD_TARGET_NDEBUG=false
         ART_BUILD_TARGET_DEBUG=false
      3. m target
Change-Id: Idafdb6588683f14e43b3f3fa8a77924cb73328ac
parent 41906d78
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment