Kiyoung Kim | 84cbf00 | 2019-08-21 19:46:51 +0900 | [diff] [blame] | 1 | /* |
| 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 | |
| 20 | inline void MockGenericVariables() { |
Justin Yun | 2a07d26 | 2019-12-16 17:47:02 +0900 | [diff] [blame] | 21 | android::linkerconfig::modules::Variables::AddValue("VENDOR_VNDK_VERSION", |
| 22 | "99"); |
| 23 | android::linkerconfig::modules::Variables::AddValue("PRODUCT_VNDK_VERSION", |
| 24 | "99"); |
Kiyoung Kim | 84cbf00 | 2019-08-21 19:46:51 +0900 | [diff] [blame] | 25 | android::linkerconfig::modules::Variables::AddValue("PRODUCT", "product"); |
| 26 | android::linkerconfig::modules::Variables::AddValue("SYSTEM_EXT", |
| 27 | "system_ext"); |
Justin Yun | 2a07d26 | 2019-12-16 17:47:02 +0900 | [diff] [blame] | 28 | android::linkerconfig::modules::Variables::AddValue("LLNDK_LIBRARIES_VENDOR", |
| 29 | "llndk_libraries"); |
| 30 | android::linkerconfig::modules::Variables::AddValue("LLNDK_LIBRARIES_PRODUCT", |
Kiyoung Kim | 84cbf00 | 2019-08-21 19:46:51 +0900 | [diff] [blame] | 31 | "llndk_libraries"); |
| 32 | android::linkerconfig::modules::Variables::AddValue( |
| 33 | "SANITIZER_RUNTIME_LIBRARIES", "sanitizer_runtime_libraries"); |
| 34 | android::linkerconfig::modules::Variables::AddValue( |
Justin Yun | 2a07d26 | 2019-12-16 17:47:02 +0900 | [diff] [blame] | 35 | "PRIVATE_LLNDK_LIBRARIES_VENDOR", "private_llndk_libraries"); |
Kiyoung Kim | 84cbf00 | 2019-08-21 19:46:51 +0900 | [diff] [blame] | 36 | android::linkerconfig::modules::Variables::AddValue( |
Justin Yun | 2a07d26 | 2019-12-16 17:47:02 +0900 | [diff] [blame] | 37 | "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 Kim | 84cbf00 | 2019-08-21 19:46:51 +0900 | [diff] [blame] | 46 | android::linkerconfig::modules::Variables::AddValue( |
Kiyoung Kim | e655807 | 2019-09-30 16:58:39 +0900 | [diff] [blame] | 47 | "VNDK_USING_CORE_VARIANT_LIBRARIES", ""); |
Kiyoung Kim | 20326ff | 2020-01-13 11:44:05 +0900 | [diff] [blame] | 48 | android::linkerconfig::modules::Variables::AddValue("STUB_LIBRARIES", |
| 49 | "stub_libraries"); |
Kiyoung Kim | 84cbf00 | 2019-08-21 19:46:51 +0900 | [diff] [blame] | 50 | } |
| 51 | |
| 52 | inline void MockVndkVersion(std::string vndk_version) { |
Justin Yun | 2a07d26 | 2019-12-16 17:47:02 +0900 | [diff] [blame] | 53 | android::linkerconfig::modules::Variables::AddValue("VENDOR_VNDK_VERSION", |
| 54 | vndk_version); |
| 55 | android::linkerconfig::modules::Variables::AddValue("PRODUCT_VNDK_VERSION", |
| 56 | vndk_version); |
Kiyoung Kim | e655807 | 2019-09-30 16:58:39 +0900 | [diff] [blame] | 57 | } |
| 58 | |
| 59 | inline void MockVndkUsingCoreVariant() { |
| 60 | android::linkerconfig::modules::Variables::AddValue( |
| 61 | "VNDK_USING_CORE_VARIANT_LIBRARIES", "vndk_using_core_variant_libraries"); |
| 62 | } |
| 63 | |
| 64 | inline void MockVnkdLite() { |
| 65 | android::linkerconfig::modules::Variables::AddValue("ro.vndk.lite", "true"); |
Justin Yun | 2a07d26 | 2019-12-16 17:47:02 +0900 | [diff] [blame] | 66 | } |