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

Commit 48b81525 authored by Prashanth Swaminathan's avatar Prashanth Swaminathan
Browse files

Don't load compiler_rt if renderscript is disabled

Bug: 206676167
Test: Verified on aosp_cf_riscv64_slim target, which doesn't support RS,
that this library loads and fails by default, but skips load when the
config.disable_renderscript flag is enabled.

Change-Id: If3f516f5e38c39b35b26d102ebdc9a4816be60a3
parent b7c18f23
Loading
Loading
Loading
Loading
+6 −1
Original line number Diff line number Diff line
@@ -185,8 +185,13 @@ public class ZygoteInit {
    private static void preloadSharedLibraries() {
        Log.i(TAG, "Preloading shared libraries...");
        System.loadLibrary("android");
        System.loadLibrary("compiler_rt");
        System.loadLibrary("jnigraphics");

        // TODO(b/206676167): This library is only used for renderscript today. When renderscript is
        // removed, this load can be removed as well.
        if (!SystemProperties.getBoolean("config.disable_renderscript", false)) {
            System.loadLibrary("compiler_rt");
        }
    }

    native private static void nativePreloadAppProcessHALs();