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

Commit df085e9f authored by Maciej Żenczykowski's avatar Maciej Żenczykowski Committed by Gerrit Code Review
Browse files

Merge "Build resolv tests with static libc++ and version script" into main

parents 3ac57a61 347f89de
Loading
Loading
Loading
Loading
+15 −5
Original line number Diff line number Diff line
@@ -168,21 +168,31 @@ aidl_interface {

}

filegroup {
    name: "resolv_test_default_map",
    srcs: ["resolv_test_default.map"],
}

cc_defaults {
    name: "resolv_test_defaults",
    cflags: [
        // networkCreatePhysical and networkCreateVpn were deprecated from netd_aidl_interface v6.
        "-Wno-error=deprecated-declarations",
    ],
    // Note that, static link liblog and libbase is a hard requirement for resolv related tests
    // because libbase is not compatible between Q and R for general platform build due
    // to its log revelant functions changing. And most of resolv related tests must be able to run
    // in Q.
    // The resolv-related tests run on older platform versions, so many libraries (such as
    // libbase and libc++) need to be linked statically. The tests also need to be linked with a
    // version script to ensure that the statically-linked library isn't exported from the
    // executable, where it would override the shared libraries that the platform itself uses. See
    // b/333438055 for an example of what goes wrong when libc++ is partially exported from an
    // executable.
    version_script: ":resolv_test_default_map",
    stl: "libc++_static",
    static_libs: [
        "libbase",
    ],
    shared_libs: [
        "liblog",
    ],
    // This field is required to make test compatible with Q devices.
    min_sdk_version: "30",
}

+20 −0
Original line number Diff line number Diff line
#
# Copyright (C) 2024 The Android Open Source Project
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
#      http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#

{
  local:
    *;
};
+0 −2
Original line number Diff line number Diff line
@@ -208,8 +208,6 @@ cc_test {
        "dnsproxyd_protocol_headers",
        "libnetd_resolv_headers",
    ],
    // TODO: make static link libc++ work.
    //stl: "libc++_static",
    shared_libs: [
        "libbinder_ndk",
        "libnetd_client",