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 | |
| 72 | cc_library { |
| 73 | name: "libbase", |
| 74 | no_libgcc: true, |
| 75 | nocrt: true, |
| 76 | vendor_available: true, |
| 77 | vndk: { |
| 78 | enabled: true, |
| 79 | support_system_process: true, |
| 80 | } |
| 81 | } |
| 82 | cc_library { |
| 83 | name: "libc", |
| 84 | no_libgcc: true, |
| 85 | nocrt: true, |
| 86 | system_shared_libs: [], |
| 87 | recovery_available: true, |
| 88 | } |
| 89 | llndk_library { |
| 90 | name: "libc", |
| 91 | symbol_file: "", |
| 92 | } |
| 93 | cc_library { |
| 94 | name: "libm", |
| 95 | no_libgcc: true, |
| 96 | nocrt: true, |
| 97 | system_shared_libs: [], |
| 98 | recovery_available: true, |
| 99 | } |
| 100 | llndk_library { |
| 101 | name: "libm", |
| 102 | symbol_file: "", |
| 103 | } |
| 104 | cc_library { |
| 105 | name: "libdl", |
| 106 | no_libgcc: true, |
| 107 | nocrt: true, |
| 108 | system_shared_libs: [], |
| 109 | recovery_available: true, |
| 110 | } |
| 111 | llndk_library { |
| 112 | name: "libdl", |
| 113 | symbol_file: "", |
| 114 | } |
| 115 | cc_library { |
| 116 | name: "libc++_static", |
| 117 | no_libgcc: true, |
| 118 | nocrt: true, |
| 119 | system_shared_libs: [], |
| 120 | stl: "none", |
| 121 | vendor_available: true, |
| 122 | recovery_available: true, |
| 123 | } |
| 124 | cc_library { |
| 125 | name: "libc++", |
| 126 | no_libgcc: true, |
| 127 | nocrt: true, |
| 128 | system_shared_libs: [], |
| 129 | stl: "none", |
| 130 | vendor_available: true, |
| 131 | recovery_available: true, |
| 132 | vndk: { |
| 133 | enabled: true, |
| 134 | support_system_process: true, |
| 135 | }, |
| 136 | } |
| 137 | cc_library { |
| 138 | name: "libunwind_llvm", |
| 139 | no_libgcc: true, |
| 140 | nocrt: true, |
| 141 | system_shared_libs: [], |
| 142 | stl: "none", |
| 143 | vendor_available: true, |
| 144 | recovery_available: true, |
| 145 | } |
| 146 | |
| 147 | cc_object { |
| 148 | name: "crtbegin_so", |
| 149 | recovery_available: true, |
| 150 | vendor_available: true, |
| 151 | } |
| 152 | |
| 153 | cc_object { |
| 154 | name: "crtbegin_static", |
| 155 | recovery_available: true, |
| 156 | vendor_available: true, |
| 157 | } |
| 158 | |
| 159 | cc_object { |
| 160 | name: "crtend_so", |
| 161 | recovery_available: true, |
| 162 | vendor_available: true, |
| 163 | } |
| 164 | |
| 165 | cc_object { |
| 166 | name: "crtend_android", |
| 167 | recovery_available: true, |
| 168 | vendor_available: true, |
| 169 | } |
| 170 | |
| 171 | cc_library { |
| 172 | name: "libprotobuf-cpp-lite", |
| 173 | } |
| 174 | ` |
| 175 | if os == android.Fuchsia { |
| 176 | ret += ` |
| 177 | cc_library { |
| 178 | name: "libbioniccompat", |
| 179 | stl: "none", |
| 180 | } |
| 181 | cc_library { |
| 182 | name: "libcompiler_rt", |
| 183 | stl: "none", |
| 184 | } |
| 185 | ` |
| 186 | } |
| 187 | return ret |
| 188 | } |