Inseob Kim | c0907f1 | 2019-02-08 21:00:45 +0900 | [diff] [blame] | 1 | // Copyright (C) 2019 The Android Open Source Project |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | |
| 15 | package cc |
| 16 | |
| 17 | import ( |
| 18 | "android/soong/android" |
| 19 | ) |
| 20 | |
| 21 | func GatherRequiredDepsForTest(os android.OsType) string { |
| 22 | ret := ` |
| 23 | toolchain_library { |
| 24 | name: "libatomic", |
| 25 | vendor_available: true, |
| 26 | recovery_available: true, |
| 27 | src: "", |
| 28 | } |
| 29 | |
| 30 | toolchain_library { |
| 31 | name: "libcompiler_rt-extras", |
| 32 | vendor_available: true, |
| 33 | recovery_available: true, |
| 34 | src: "", |
| 35 | } |
| 36 | |
| 37 | toolchain_library { |
| 38 | name: "libclang_rt.builtins-arm-android", |
| 39 | vendor_available: true, |
| 40 | recovery_available: true, |
| 41 | src: "", |
| 42 | } |
| 43 | |
| 44 | toolchain_library { |
| 45 | name: "libclang_rt.builtins-aarch64-android", |
| 46 | vendor_available: true, |
| 47 | recovery_available: true, |
| 48 | src: "", |
| 49 | } |
| 50 | |
| 51 | toolchain_library { |
| 52 | name: "libclang_rt.builtins-i686-android", |
| 53 | vendor_available: true, |
| 54 | recovery_available: true, |
| 55 | src: "", |
| 56 | } |
| 57 | |
| 58 | toolchain_library { |
| 59 | name: "libclang_rt.builtins-x86_64-android", |
| 60 | vendor_available: true, |
| 61 | recovery_available: true, |
| 62 | src: "", |
| 63 | } |
| 64 | |
| 65 | toolchain_library { |
| 66 | name: "libgcc", |
| 67 | vendor_available: true, |
| 68 | recovery_available: true, |
| 69 | src: "", |
| 70 | } |
| 71 | |
Yi Kong | acee27c | 2019-03-29 20:05:14 -0700 | [diff] [blame^] | 72 | toolchain_library { |
| 73 | name: "libgcc_stripped", |
| 74 | vendor_available: true, |
| 75 | recovery_available: true, |
| 76 | src: "", |
| 77 | } |
| 78 | |
Inseob Kim | c0907f1 | 2019-02-08 21:00:45 +0900 | [diff] [blame] | 79 | cc_library { |
Inseob Kim | c0907f1 | 2019-02-08 21:00:45 +0900 | [diff] [blame] | 80 | name: "libc", |
| 81 | no_libgcc: true, |
| 82 | nocrt: true, |
| 83 | system_shared_libs: [], |
| 84 | recovery_available: true, |
| 85 | } |
| 86 | llndk_library { |
| 87 | name: "libc", |
| 88 | symbol_file: "", |
| 89 | } |
| 90 | cc_library { |
| 91 | name: "libm", |
| 92 | no_libgcc: true, |
| 93 | nocrt: true, |
| 94 | system_shared_libs: [], |
| 95 | recovery_available: true, |
| 96 | } |
| 97 | llndk_library { |
| 98 | name: "libm", |
| 99 | symbol_file: "", |
| 100 | } |
| 101 | cc_library { |
| 102 | name: "libdl", |
| 103 | no_libgcc: true, |
| 104 | nocrt: true, |
| 105 | system_shared_libs: [], |
| 106 | recovery_available: true, |
| 107 | } |
| 108 | llndk_library { |
| 109 | name: "libdl", |
| 110 | symbol_file: "", |
| 111 | } |
| 112 | cc_library { |
| 113 | name: "libc++_static", |
| 114 | no_libgcc: true, |
| 115 | nocrt: true, |
| 116 | system_shared_libs: [], |
| 117 | stl: "none", |
| 118 | vendor_available: true, |
| 119 | recovery_available: true, |
| 120 | } |
| 121 | cc_library { |
| 122 | name: "libc++", |
| 123 | no_libgcc: true, |
| 124 | nocrt: true, |
| 125 | system_shared_libs: [], |
| 126 | stl: "none", |
| 127 | vendor_available: true, |
| 128 | recovery_available: true, |
| 129 | vndk: { |
| 130 | enabled: true, |
| 131 | support_system_process: true, |
| 132 | }, |
| 133 | } |
| 134 | cc_library { |
| 135 | name: "libunwind_llvm", |
| 136 | no_libgcc: true, |
| 137 | nocrt: true, |
| 138 | system_shared_libs: [], |
| 139 | stl: "none", |
| 140 | vendor_available: true, |
| 141 | recovery_available: true, |
| 142 | } |
| 143 | |
| 144 | cc_object { |
| 145 | name: "crtbegin_so", |
| 146 | recovery_available: true, |
| 147 | vendor_available: true, |
| 148 | } |
| 149 | |
| 150 | cc_object { |
| 151 | name: "crtbegin_static", |
| 152 | recovery_available: true, |
| 153 | vendor_available: true, |
| 154 | } |
| 155 | |
| 156 | cc_object { |
| 157 | name: "crtend_so", |
| 158 | recovery_available: true, |
| 159 | vendor_available: true, |
| 160 | } |
| 161 | |
| 162 | cc_object { |
| 163 | name: "crtend_android", |
| 164 | recovery_available: true, |
| 165 | vendor_available: true, |
| 166 | } |
| 167 | |
| 168 | cc_library { |
| 169 | name: "libprotobuf-cpp-lite", |
| 170 | } |
| 171 | ` |
| 172 | if os == android.Fuchsia { |
| 173 | ret += ` |
| 174 | cc_library { |
| 175 | name: "libbioniccompat", |
| 176 | stl: "none", |
| 177 | } |
| 178 | cc_library { |
| 179 | name: "libcompiler_rt", |
| 180 | stl: "none", |
| 181 | } |
| 182 | ` |
| 183 | } |
| 184 | return ret |
| 185 | } |