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

Commit 580b93c3 authored by A. Cody Schuffelen's avatar A. Cody Schuffelen
Browse files

Add `vendor_available: true` to libbuildverison

This allows using libbuildversion in Cuttlefish, which builds many
binaries for both vendor and host.

On vendor executables, this gets the build id from the
ro.vendor.build.version.incremental property.

Bug: 206843934
Test: m -j
Change-Id: I9ab11b42de3f1febf282f107c3e137592097d3c0
parent 2a709292
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -19,4 +19,5 @@ cc_library_static {
        "//apex_available:platform",
        "//apex_available:anyapex",
    ],
    vendor_available: true,
}
+4 −0
Original line number Diff line number Diff line
@@ -36,7 +36,11 @@ std::string GetBuildNumber() {
    return soong_build_number;
  }

#ifdef __ANDROID_VENDOR__
  const prop_info* pi = __system_property_find("ro.vendor.build.version.incremental");
#else
  const prop_info* pi = __system_property_find("ro.build.version.incremental");
#endif
  if (pi == nullptr) return "";

  std::string property_value;