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

Commit 47ce9996 authored by John Wu's avatar John Wu Committed by Android (Google) Code Review
Browse files

Merge "[Ravenwood] Build our own libandroid_runtime" into main

parents f84b442e a785a1bc
Loading
Loading
Loading
Loading
+40 −12
Original line number Diff line number Diff line
@@ -16,8 +16,8 @@ license {
}

soong_config_module_type {
    name: "cc_library_shared_for_libandroid_runtime",
    module_type: "cc_library_shared",
    name: "cc_defaults_for_libandroid_runtime",
    module_type: "cc_defaults",
    config_namespace: "ANDROID",
    bool_variables: [
        "release_binder_death_recipient_weak_from_jni",
@@ -27,8 +27,8 @@ soong_config_module_type {
    ],
}

cc_library_shared_for_libandroid_runtime {
    name: "libandroid_runtime",
cc_defaults_for_libandroid_runtime {
    name: "libandroid_runtime_defaults",
    host_supported: true,
    cflags: [
        "-Wno-cast-function-type-mismatch",
@@ -451,21 +451,15 @@ cc_library_shared_for_libandroid_runtime {
            ],
            static_libs: [
                "libandroidfw",
                "libbase",
                "libbinary_parse",
                "libcutils",
                "libdng_sdk",
                "libft2",
                "libharfbuzz_ng",
                "libhostgraphics",
                "libhwui",
                "libicui18n",
                "libicuuc",
                "libicuuc_stubdata",
                "libimage_type_recognition",
                "libinput",
                "libjpeg",
                "liblog",
                "libminikin",
                "libnativehelper_jvm",
                "libpiex",
@@ -473,7 +467,6 @@ cc_library_shared_for_libandroid_runtime {
                "libsqlite",
                "libtiff_directory",
                "libui-types",
                "libutils",
                "libwebp-decode",
                "libwebp-encode",
                "libperfetto_c",
@@ -490,7 +483,6 @@ cc_library_shared_for_libandroid_runtime {
                "libnativehelper_jvm",
                "libui-types",
            ],
            stl: "libc++_static",
        },
        host_linux: {
            srcs: [
@@ -514,6 +506,27 @@ cc_library_shared_for_libandroid_runtime {
                "libhidlbase", // libhwbinder is in here
                "libaconfig_storage_read_api_cc",
            ],
        },
    },
}

cc_library_shared {
    name: "libandroid_runtime",
    defaults: ["libandroid_runtime_defaults"],
    target: {
        host: {
            static_libs: [
                "libbase",
                "libcutils",
                "liblog",
                "libutils",
                "libicui18n",
                "libicuuc",
                "libicuuc_stubdata",
            ],
            stl: "libc++_static",
        },
        host_linux: {
            version_script: "platform/linux/libandroid_runtime_export.txt",
        },
        darwin: {
@@ -537,6 +550,21 @@ cc_library_shared_for_libandroid_runtime {
    },
}

cc_library_host_shared {
    name: "libandroid_runtime_ravenwood",
    defaults: ["libandroid_runtime_defaults"],
    stem: "libandroid_runtime",
    installable: false,
    visibility: ["//frameworks/base/ravenwood"],
    shared_libs: [
        "libbase",
        "libcutils",
        "liblog",
        "libutils",
        "libicu",
    ],
}

cc_library_shared {
    name: "libvintf_jni",

+0 −6
Original line number Diff line number Diff line
@@ -38,12 +38,6 @@
    _ZN7android15InputDeviceInfo*;
    _ZN7android31android_view_InputDevice_create*;
    _ZN7android53android_view_Surface_createFromIGraphicBufferProducer*;

    # symbols needed by Ravenwood to override system properties
    __system_property_find;
    __system_property_get;
    __system_property_read_callback;
    __system_property_set;
  local:
    *;
};
+1 −1
Original line number Diff line number Diff line
@@ -613,7 +613,7 @@ android_ravenwood_libgroup {
        // Libraries has to be loaded in the following order
        "libravenwood_initializer",
        "libravenwood_runtime",
        "libandroid_runtime",
        "libandroid_runtime_ravenwood",
    ],
}

+0 −8
Original line number Diff line number Diff line
@@ -19,7 +19,6 @@ package android.platform.test.ravenwood;
import static android.os.UserHandle.SYSTEM;

import static com.android.modules.utils.ravenwood.RavenwoodHelper.RavenwoodInternal.RAVENWOOD_RUNTIME_PATH_JAVA_SYSPROP;
import static com.android.ravenwood.common.RavenwoodInternalUtils.getRavenwoodRuntimePath;

import static org.junit.Assert.assertThrows;

@@ -207,13 +206,6 @@ public class RavenwoodDriver {
        // Do the basic set up for the android sysprops.
        RavenwoodSystemProperties.initialize();

        // Set ICU data file
        String icuData = getRavenwoodRuntimePath()
                + "ravenwood-data/"
                + RavenwoodRuntimeNative.getIcuDataName()
                + ".dat";
        RavenwoodRuntimeNative.setSystemProperty("ro.icu.data.path", icuData);

        // Enable all log levels for native logging, until we'll have a way to change the native
        // side log level at runtime.
        // Do this after loading RAVENWOOD_NATIVE_RUNTIME_NAME (which backs Os.setenv()),
+10 −0
Original line number Diff line number Diff line
@@ -16,6 +16,9 @@

package android.platform.test.ravenwood;

import static com.android.ravenwood.common.RavenwoodInternalUtils.getRavenwoodRuntimePath;

import com.android.ravenwood.RavenwoodRuntimeNative;
import com.android.ravenwood.common.RavenwoodInternalUtils;

import java.util.Arrays;
@@ -165,6 +168,13 @@ public final class RavenwoodNativeLoader {
        ensurePropertyNotSet(KEYBOARD_PATHS);
        ensurePropertyNotSet(GRAPHICS_NATIVE_CLASSES);

        // Set ICU data file
        String icuData = getRavenwoodRuntimePath()
                + "ravenwood-data/"
                + RavenwoodRuntimeNative.getIcuDataName()
                + ".dat";
        setProperty(ICU_DATA_PATH, icuData);

        // Build the property values
        final var joiner = Collectors.joining(",");