summaryrefslogtreecommitdiff
path: root/base
diff options
context:
space:
mode:
authorLogan Chien <loganchien@google.com>2018-10-23 13:44:45 +0800
committerLogan Chien <loganchien@google.com>2018-10-23 13:44:45 +0800
commit73fe94d1960e40030838836ec778b5c2813eb0b7 (patch)
tree8b0f8972bea2286988c1a08fb59ff27d6eb65af4 /base
parentce34eb5d957de03fe43cca634e9acbdfe3af1b49 (diff)
downloadlibhidl-73fe94d1960e40030838836ec778b5c2813eb0b7.tar.gz
Use static linkage to reduce user/userdebug differences
This commit changes the linkage of `kGcovPrefixEnvVar`, `kGcovPrefixOverrideEnvVar`, `kGcovPrefixPath`, `kSysPropHalCoverage`, and `kSysPropInstrumentationPath` to static linkage so that they won't be exported in userdebug build. This ensures both user and userdebug build export the same symbol set. Bug: 117859056 Test: libhidlbase.so builds w/o problems under userdebug build Change-Id: Id61b827f3da1964e060db6f862132da70b29cea0
Diffstat (limited to 'base')
-rw-r--r--base/HidlInternal.cpp15
1 files changed, 8 insertions, 7 deletions
diff --git a/base/HidlInternal.cpp b/base/HidlInternal.cpp
index 81b353d..440b30f 100644
--- a/base/HidlInternal.cpp
+++ b/base/HidlInternal.cpp
@@ -31,16 +31,17 @@
#include <regex>
extern "C" __attribute__((weak)) void __sanitizer_cov_dump();
-const char* kGcovPrefixEnvVar = "GCOV_PREFIX";
-const char* kGcovPrefixOverrideEnvVar = "GCOV_PREFIX_OVERRIDE";
-const char* kGcovPrefixPath = "/data/misc/trace/";
-const char* kSysPropHalCoverage = "hal.coverage.enable";
+
+const char kGcovPrefixEnvVar[] = "GCOV_PREFIX";
+const char kGcovPrefixOverrideEnvVar[] = "GCOV_PREFIX_OVERRIDE";
+const char kGcovPrefixPath[] = "/data/misc/trace/";
+const char kSysPropHalCoverage[] = "hal.coverage.enable";
#if defined(__LP64__)
-const char* kSysPropInstrumentationPath = "hal.instrumentation.lib.path.64";
+const char kSysPropInstrumentationPath[] = "hal.instrumentation.lib.path.64";
#else
-const char* kSysPropInstrumentationPath = "hal.instrumentation.lib.path.32";
-#endif
+const char kSysPropInstrumentationPath[] = "hal.instrumentation.lib.path.32";
#endif
+#endif // LIBHIDL_TARGET_DEBUGGABLE
namespace android {
namespace hardware {