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

Commit 6f85be04 authored by Nelson Li's avatar Nelson Li
Browse files

Keep RECOVERY_API_VERSION and RECOVERY_FSTAB_VERSION in sync.

`RECOVERY_API_VERSION` and `RECOVERY_FSTAB_VERSION` were previously
only used in `build/core/Makefile`, and other places manually
maintained synchronization using hardcoded values. This change uses
corresponding `soong_config_variables` to keep them synchronized and
avoid errors.

Bug: 339143524
Test: m misc_info
Change-Id: I137ece41ebb1039f6069e0a8a6c8b0d74412e8d8
parent 46557897
Loading
Loading
Loading
Loading
+22 −10
Original line number Diff line number Diff line
@@ -49,18 +49,30 @@ license {
    ],
}

cc_defaults {
soong_config_module_type {
    name: "recovery_cc_defaults",
    module_type: "cc_defaults",
    config_namespace: "recovery",
    value_variables: ["recovery_api_version"],
    properties: [
        "cflags",
    ],
}

recovery_cc_defaults {
    name: "recovery_defaults",

    soong_config_variables: {
        recovery_api_version: {
            cflags: [
                "-D_FILE_OFFSET_BITS=64",

                // Must be the same as RECOVERY_API_VERSION.
        "-DRECOVERY_API_VERSION=3",

                "-DRECOVERY_API_VERSION=%s",
                "-Wall",
                "-Werror",
            ],
        },
    },
}

cc_library_static {
+0 −4
Original line number Diff line number Diff line
@@ -14,10 +14,6 @@

LOCAL_PATH := $(call my-dir)

# Needed by build/make/core/Makefile. Must be consistent with the value in Android.bp.
RECOVERY_API_VERSION := 3
RECOVERY_FSTAB_VERSION := 2

# TARGET_RECOVERY_UI_LIB should be one of librecovery_ui_{default,wear,vr,ethernet} or a
# device-specific module that defines make_device() and the exact RecoveryUI class for the
# target. It defaults to librecovery_ui_default, which uses ScreenRecoveryUI.