Make kAshmemMemoryName constexpr
It is the only object in the .bss section in
android.hidl.memory@1.0-impl. Make it constexpr so that it is
constructed at build time.
Bug: 138856262
Test: Build android.hidl.memory@1.0-impl on cuttlefish and see
its .bss section is gone.
Change-Id: I44bef02b5a67e5ddc15c5cb77a568ea3dd01a45d
diff --git a/transport/memory/1.0/default/HidlFetch.cpp b/transport/memory/1.0/default/HidlFetch.cpp
index d47cf97..a636e03 100644
--- a/transport/memory/1.0/default/HidlFetch.cpp
+++ b/transport/memory/1.0/default/HidlFetch.cpp
@@ -16,9 +16,11 @@
#include "HidlFetch.h"
+#include <string_view>
+
#include "AshmemMapper.h"
-static std::string kAshmemMemoryName = "ashmem";
+static constexpr std::string_view kAshmemMemoryName = "ashmem";
namespace android {
namespace hidl {