diff options
author | 2024-10-15 16:03:52 -0400 | |
---|---|---|
committer | 2024-10-15 16:03:52 -0400 | |
commit | 0ec33d71473d74a8c94f5e6615c7a2ec82eac72f (patch) | |
tree | 9b9ec38f993674c163c8aaf3ead79904101ae9c5 /opengl | |
parent | 9333e35abee0b81d533cd9853fa57bdf3fe5c503 (diff) |
Allow to override ANGLE suffix with debug.angle.libs.suffix
This allows us to avoid .so name "collision" which results in an
unexpected library being loaded when multiple ANGLE libraries are set up
Bug: b/371356548
Tested: cvd create --gpu_mode=guest_swiftshader, ANGLE from apk
Change-Id: I5a6dce90fe559f3884bc0fb956b884d8481b8c00
Diffstat (limited to 'opengl')
-rw-r--r-- | opengl/libs/EGL/Loader.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/opengl/libs/EGL/Loader.cpp b/opengl/libs/EGL/Loader.cpp index bf0e38e986..fed6afc8e0 100644 --- a/opengl/libs/EGL/Loader.cpp +++ b/opengl/libs/EGL/Loader.cpp @@ -548,6 +548,10 @@ static void* load_angle(const char* kind, android_namespace_t* ns) { .flags = ANDROID_DLEXT_USE_NAMESPACE, .library_namespace = ns, }; + auto prop = base::GetProperty("debug.angle.libs.suffix", ""); + if (!prop.empty()) { + name = std::string("lib") + kind + "_" + prop + ".so"; + } so = do_android_dlopen_ext(name.c_str(), RTLD_LOCAL | RTLD_NOW, &dlextinfo); } |