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

Commit 49255346 authored by David Drysdale's avatar David Drysdale
Browse files

Use defaults to reference current keymint version

The KeyMint HAL will soon be updated for a new version. To make this
process easier, add a cc_defaults and rust_defaults that references
the "current" version, and use this elsewhere. This should hopefully
mean that a future version bump only needs to happen in the defaults.

Test: TreeHugger
Change-Id: If7dd0c5778acb92177e16fd4fb4a04dcb837ad06
parent f665b8fa
Loading
Loading
Loading
Loading
+27 −0
Original line number Diff line number Diff line
@@ -38,3 +38,30 @@ aidl_interface {
    },
    versions: ["1"],
}

// cc_defaults that includes the latest KeyMint AIDL library.
// Modules that depend on KeyMint directly can include this cc_defaults to avoid
// managing dependency versions explicitly.
cc_defaults {
    name: "keymint_use_latest_hal_aidl_ndk_static",
    static_libs: [
        "android.hardware.security.keymint-V1-ndk",
    ],
}

cc_defaults {
    name: "keymint_use_latest_hal_aidl_ndk_shared",
    shared_libs: [
        "android.hardware.security.keymint-V1-ndk",
    ],
}

// A rust_defaults that includes the latest KeyMint AIDL library.
// Modules that depend on KeyMint directly can include this cc_defaults to avoid
// managing dependency versions explicitly.
rust_defaults {
    name: "keymint_use_latest_hal_aidl_rust",
    rustlibs: [
        "android.hardware.security.keymint-V1-rust",
    ],
}
+3 −1
Original line number Diff line number Diff line
@@ -21,8 +21,10 @@ cc_binary {
        "-Wall",
        "-Wextra",
    ],
    defaults: [
        "keymint_use_latest_hal_aidl_ndk_shared",
    ],
    shared_libs: [
        "android.hardware.security.keymint-V1-ndk",
        "android.hardware.security.sharedsecret-V1-ndk",
        "android.hardware.security.secureclock-V1-ndk",
        "libbase",
+1 −1
Original line number Diff line number Diff line
@@ -26,6 +26,7 @@ package {
cc_defaults {
    name: "keymint_vts_defaults",
    defaults: [
        "keymint_use_latest_hal_aidl_ndk_static",
        "use_libaidlvintf_gtest_helper_static",
        "VtsHalTargetTestDefaults",
    ],
@@ -34,7 +35,6 @@ cc_defaults {
        "libcrypto",
    ],
    static_libs: [
        "android.hardware.security.keymint-V1-ndk",
        "android.hardware.security.secureclock-V1-ndk",
        "libcppbor_external",
        "libcppcose_rkp",
+1 −1
Original line number Diff line number Diff line
@@ -27,6 +27,7 @@ cc_benchmark {
    name: "VtsAidlKeyMintBenchmarkTest",
    defaults: [
        "VtsHalTargetTestDefaults",
        "keymint_use_latest_hal_aidl_ndk_static",
        "use_libaidlvintf_gtest_helper_static",
    ],
    srcs: [
@@ -39,7 +40,6 @@ cc_benchmark {
        "libkeymint_support",
    ],
    static_libs: [
        "android.hardware.security.keymint-V1-ndk",
        "android.hardware.security.secureclock-V1-ndk",
        "libcppbor_external",
        "libchrome",
+3 −1
Original line number Diff line number Diff line
@@ -40,8 +40,10 @@ cc_library {
    export_include_dirs: [
        "include",
    ],
    defaults: [
        "keymint_use_latest_hal_aidl_ndk_shared",
    ],
    shared_libs: [
        "android.hardware.security.keymint-V1-ndk",
        "libbase",
        "libcrypto",
        "libutils",
Loading