blob: 00cc508981973f83068f7d0fccd01a3c33e179d2 [file] [log] [blame]
Kiyoung Kim84cbf002019-08-21 19:46:51 +09001/*
2 * Copyright (C) 2019 The Android Open Source Project
3 *
4 * Licensed under the Apache License, Version 2.0 (the "License");
5 * you may not use this file except in compliance with the License.
6 * You may obtain a copy of the License at
7 *
8 * http://www.apache.org/licenses/LICENSE-2.0
9 *
10 * Unless required by applicable law or agreed to in writing, software
11 * distributed under the License is distributed on an "AS IS" BASIS,
12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13 * See the License for the specific language governing permissions and
14 * limitations under the License.
15 */
16#pragma once
17
18#include "linkerconfig/variables.h"
19
20inline void MockGenericVariables() {
Justin Yun2a07d262019-12-16 17:47:02 +090021 android::linkerconfig::modules::Variables::AddValue("VENDOR_VNDK_VERSION",
22 "99");
23 android::linkerconfig::modules::Variables::AddValue("PRODUCT_VNDK_VERSION",
24 "99");
Kiyoung Kim84cbf002019-08-21 19:46:51 +090025 android::linkerconfig::modules::Variables::AddValue("PRODUCT", "product");
26 android::linkerconfig::modules::Variables::AddValue("SYSTEM_EXT",
27 "system_ext");
Justin Yun2a07d262019-12-16 17:47:02 +090028 android::linkerconfig::modules::Variables::AddValue("LLNDK_LIBRARIES_VENDOR",
29 "llndk_libraries");
30 android::linkerconfig::modules::Variables::AddValue("LLNDK_LIBRARIES_PRODUCT",
Kiyoung Kim84cbf002019-08-21 19:46:51 +090031 "llndk_libraries");
32 android::linkerconfig::modules::Variables::AddValue(
33 "SANITIZER_RUNTIME_LIBRARIES", "sanitizer_runtime_libraries");
34 android::linkerconfig::modules::Variables::AddValue(
Justin Yun2a07d262019-12-16 17:47:02 +090035 "PRIVATE_LLNDK_LIBRARIES_VENDOR", "private_llndk_libraries");
Kiyoung Kim84cbf002019-08-21 19:46:51 +090036 android::linkerconfig::modules::Variables::AddValue(
Justin Yun2a07d262019-12-16 17:47:02 +090037 "PRIVATE_LLNDK_LIBRARIES_PRODUCT", "private_llndk_libraries");
38 android::linkerconfig::modules::Variables::AddValue(
39 "VNDK_SAMEPROCESS_LIBRARIES_VENDOR", "vndk_sameprocess_libraries");
40 android::linkerconfig::modules::Variables::AddValue(
41 "VNDK_SAMEPROCESS_LIBRARIES_PRODUCT", "vndk_sameprocess_libraries");
42 android::linkerconfig::modules::Variables::AddValue(
43 "VNDK_CORE_LIBRARIES_VENDOR", "vndk_core_libraries");
44 android::linkerconfig::modules::Variables::AddValue(
45 "VNDK_CORE_LIBRARIES_PRODUCT", "vndk_core_libraries");
Kiyoung Kim84cbf002019-08-21 19:46:51 +090046 android::linkerconfig::modules::Variables::AddValue(
Kiyoung Kime6558072019-09-30 16:58:39 +090047 "VNDK_USING_CORE_VARIANT_LIBRARIES", "");
Kiyoung Kim20326ff2020-01-13 11:44:05 +090048 android::linkerconfig::modules::Variables::AddValue("STUB_LIBRARIES",
49 "stub_libraries");
Kiyoung Kim84cbf002019-08-21 19:46:51 +090050}
51
52inline void MockVndkVersion(std::string vndk_version) {
Justin Yun2a07d262019-12-16 17:47:02 +090053 android::linkerconfig::modules::Variables::AddValue("VENDOR_VNDK_VERSION",
54 vndk_version);
55 android::linkerconfig::modules::Variables::AddValue("PRODUCT_VNDK_VERSION",
56 vndk_version);
Kiyoung Kime6558072019-09-30 16:58:39 +090057}
58
59inline void MockVndkUsingCoreVariant() {
60 android::linkerconfig::modules::Variables::AddValue(
61 "VNDK_USING_CORE_VARIANT_LIBRARIES", "vndk_using_core_variant_libraries");
62}
63
64inline void MockVnkdLite() {
65 android::linkerconfig::modules::Variables::AddValue("ro.vndk.lite", "true");
Justin Yun2a07d262019-12-16 17:47:02 +090066}