summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorErik Kundiman <erik@megapahit.org>2025-07-02 15:12:00 +0800
committerErik Kundiman <erik@megapahit.org>2025-07-02 15:17:18 +0800
commit16d3d725998f1189083c429a1cbb2cc3fb15b7da (patch)
tree5b46c6c964a196323841e6c4a26ae0b174ed01c4
parentdcb1bf8b508c4fb8303e2a1b4c4f64c58f3e0580 (diff)
Preload CEF automatically on Linux aarch64"
This reverts commit 6d9bda960f179aa8ea3765c10aa3140d22c74086, and add the aarch64 condition for preloading. We can't use gDirUtilp->getLLPluginDir() yet in llappviewerlinux because it's not instantiated yet in that phase.
-rw-r--r--indra/newview/CMakeLists.txt4
-rw-r--r--indra/newview/llappviewerlinux.cpp6
2 files changed, 9 insertions, 1 deletions
diff --git a/indra/newview/CMakeLists.txt b/indra/newview/CMakeLists.txt
index 0ded363901..7c79f658a0 100644
--- a/indra/newview/CMakeLists.txt
+++ b/indra/newview/CMakeLists.txt
@@ -46,6 +46,9 @@ include(VisualLeakDetector)
#include(VulkanGltf)
include(ZLIBNG)
include(LLPrimitive)
+if (CMAKE_SYSTEM_PROCESSOR MATCHES aarch64)
+ include(UnixInstall)
+endif ()
if (ENABLE_MEDIA_PLUGINS)
include(LibVLCPlugin)
@@ -1498,6 +1501,7 @@ if (NOT (DARWIN OR WINDOWS))
llappviewerlinux.cpp
PROPERTIES
COMPILE_DEFINITIONS "${VIEWER_CHANNEL_VERSION_DEFINES}"
+ COMPILE_FLAGS "-DAPP_PLUGIN_DIR=\\\"${INSTALL_LIBRARY_DIR}\\\""
)
#LIST(APPEND viewer_SOURCE_FILES llappviewerlinux_api_dbus.cpp)
if (NOT CMAKE_CXX_COMPILER_ID MATCHES AppleClang)
diff --git a/indra/newview/llappviewerlinux.cpp b/indra/newview/llappviewerlinux.cpp
index 9135921acc..376eeca9fd 100644
--- a/indra/newview/llappviewerlinux.cpp
+++ b/indra/newview/llappviewerlinux.cpp
@@ -126,7 +126,11 @@ int main( int argc, char **argv )
// install unexpected exception handler
gOldTerminateHandler = std::set_terminate(exceptionTerminateHandler);
- //unsetenv( "LD_PRELOAD" ); // <FS:ND/> Get rid of any preloading, we do not want this to happen during startup of plugins.
+#ifdef __aarch64__
+ setenv("LD_PRELOAD", APP_PLUGIN_DIR"/libcef.so", 1);
+#else
+ unsetenv( "LD_PRELOAD" ); // <FS:ND/> Get rid of any preloading, we do not want this to happen during startup of plugins.
+#endif
bool ok = viewer_app_ptr->init();
if(!ok)