blob: 4d0b28b7f404ccc9fe5b9d4cecdfce402ff43e14 [file] [log] [blame]
Inseob Kimc0907f12019-02-08 21:00:45 +09001// 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
15package cc
16
17import (
18 "android/soong/android"
19)
20
Paul Duffin77980a82019-12-19 16:01:36 +000021func RegisterRequiredBuildComponentsForTest(ctx android.RegistrationContext) {
Paul Duffind6867912019-12-19 14:38:36 +000022 RegisterPrebuiltBuildComponents(ctx)
Paul Duffind6867912019-12-19 14:38:36 +000023 android.RegisterPrebuiltMutators(ctx)
Paul Duffin075c4172019-12-19 19:06:13 +000024
Paul Duffin036e7002019-12-19 19:16:28 +000025 RegisterCCBuildComponents(ctx)
Paul Duffin2ee69792020-01-16 12:14:42 +000026 RegisterBinaryBuildComponents(ctx)
Paul Duffin6c26dc72019-12-19 15:02:40 +000027 RegisterLibraryBuildComponents(ctx)
Paul Duffin1c6c1c72020-02-21 10:28:43 +000028 RegisterLibraryHeadersBuildComponents(ctx)
Paul Duffin6c26dc72019-12-19 15:02:40 +000029
30 ctx.RegisterModuleType("toolchain_library", ToolchainLibraryFactory)
31 ctx.RegisterModuleType("llndk_library", LlndkLibraryFactory)
32 ctx.RegisterModuleType("cc_object", ObjectFactory)
Martin Stjernholm7feceb22020-07-11 04:33:29 +010033 ctx.RegisterModuleType("cc_genrule", genRuleFactory)
Colin Crossf28329d2020-02-15 11:00:10 -080034 ctx.RegisterModuleType("ndk_prebuilt_shared_stl", NdkPrebuiltSharedStlFactory)
35 ctx.RegisterModuleType("ndk_prebuilt_object", NdkPrebuiltObjectFactory)
Dan Albertde5aade2020-06-30 12:32:51 -070036 ctx.RegisterModuleType("ndk_library", NdkLibraryFactory)
Paul Duffin77980a82019-12-19 16:01:36 +000037}
38
Paul Duffina04c1072020-03-02 10:16:35 +000039func GatherRequiredDepsForTest(oses ...android.OsType) string {
Inseob Kimc0907f12019-02-08 21:00:45 +090040 ret := `
41 toolchain_library {
42 name: "libatomic",
Martin Stjernholm7feceb22020-07-11 04:33:29 +010043 defaults: ["linux_bionic_supported"],
Inseob Kimc0907f12019-02-08 21:00:45 +090044 vendor_available: true,
45 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -080046 native_bridge_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +090047 src: "",
48 }
49
50 toolchain_library {
51 name: "libcompiler_rt-extras",
52 vendor_available: true,
53 recovery_available: true,
54 src: "",
55 }
56
57 toolchain_library {
58 name: "libclang_rt.builtins-arm-android",
59 vendor_available: true,
60 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -080061 native_bridge_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +090062 src: "",
63 }
64
65 toolchain_library {
66 name: "libclang_rt.builtins-aarch64-android",
67 vendor_available: true,
68 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -080069 native_bridge_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +090070 src: "",
71 }
72
Jooyung Han75568392020-03-20 04:29:24 +090073 cc_prebuilt_library_shared {
74 name: "libclang_rt.hwasan-aarch64-android",
75 nocrt: true,
76 vendor_available: true,
77 recovery_available: true,
78 system_shared_libs: [],
79 stl: "none",
80 srcs: [""],
81 check_elf_files: false,
82 sanitize: {
83 never: true,
84 },
85 }
86
Inseob Kimc0907f12019-02-08 21:00:45 +090087 toolchain_library {
88 name: "libclang_rt.builtins-i686-android",
89 vendor_available: true,
90 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -080091 native_bridge_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +090092 src: "",
93 }
94
95 toolchain_library {
96 name: "libclang_rt.builtins-x86_64-android",
Martin Stjernholm7feceb22020-07-11 04:33:29 +010097 defaults: ["linux_bionic_supported"],
Inseob Kimc0907f12019-02-08 21:00:45 +090098 vendor_available: true,
99 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800100 native_bridge_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900101 src: "",
102 }
103
104 toolchain_library {
Mitch Phillipsda9a4632019-07-15 09:34:09 -0700105 name: "libclang_rt.fuzzer-arm-android",
106 vendor_available: true,
107 recovery_available: true,
108 src: "",
109 }
110
111 toolchain_library {
112 name: "libclang_rt.fuzzer-aarch64-android",
113 vendor_available: true,
114 recovery_available: true,
115 src: "",
116 }
117
118 toolchain_library {
119 name: "libclang_rt.fuzzer-i686-android",
120 vendor_available: true,
121 recovery_available: true,
122 src: "",
123 }
124
125 toolchain_library {
126 name: "libclang_rt.fuzzer-x86_64-android",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100127 defaults: ["linux_bionic_supported"],
Mitch Phillipsda9a4632019-07-15 09:34:09 -0700128 vendor_available: true,
129 recovery_available: true,
130 src: "",
131 }
132
133 toolchain_library {
134 name: "libclang_rt.fuzzer-x86_64",
135 vendor_available: true,
136 recovery_available: true,
137 src: "",
138 }
139
Paul Duffind6867912019-12-19 14:38:36 +0000140 // Needed for sanitizer
141 cc_prebuilt_library_shared {
142 name: "libclang_rt.ubsan_standalone-aarch64-android",
143 vendor_available: true,
144 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800145 system_shared_libs: [],
Paul Duffind6867912019-12-19 14:38:36 +0000146 srcs: [""],
147 }
148
Mitch Phillipsda9a4632019-07-15 09:34:09 -0700149 toolchain_library {
Inseob Kimc0907f12019-02-08 21:00:45 +0900150 name: "libgcc",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100151 defaults: ["linux_bionic_supported"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900152 vendor_available: true,
153 recovery_available: true,
154 src: "",
155 }
156
Yi Kongacee27c2019-03-29 20:05:14 -0700157 toolchain_library {
158 name: "libgcc_stripped",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100159 defaults: ["linux_bionic_supported"],
Yi Kongacee27c2019-03-29 20:05:14 -0700160 vendor_available: true,
161 recovery_available: true,
Colin Crossc511bc52020-04-07 16:50:32 +0000162 sdk_version: "current",
Yi Kongacee27c2019-03-29 20:05:14 -0700163 src: "",
164 }
165
Inseob Kimc0907f12019-02-08 21:00:45 +0900166 cc_library {
Inseob Kimc0907f12019-02-08 21:00:45 +0900167 name: "libc",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100168 defaults: ["linux_bionic_supported"],
Yi Konge7fe9912019-06-02 00:53:50 -0700169 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900170 nocrt: true,
Peter Collingbournee5ba2862019-12-10 18:37:45 -0800171 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900172 system_shared_libs: [],
173 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800174 stubs: {
175 versions: ["27", "28", "29"],
176 },
Inseob Kimc0907f12019-02-08 21:00:45 +0900177 }
178 llndk_library {
179 name: "libc",
180 symbol_file: "",
Colin Crossc511bc52020-04-07 16:50:32 +0000181 sdk_version: "current",
Inseob Kimc0907f12019-02-08 21:00:45 +0900182 }
183 cc_library {
184 name: "libm",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100185 defaults: ["linux_bionic_supported"],
Yi Konge7fe9912019-06-02 00:53:50 -0700186 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900187 nocrt: true,
Peter Collingbournee5ba2862019-12-10 18:37:45 -0800188 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900189 system_shared_libs: [],
190 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800191 stubs: {
192 versions: ["27", "28", "29"],
193 },
194 apex_available: [
195 "//apex_available:platform",
196 "myapex"
197 ],
Inseob Kimc0907f12019-02-08 21:00:45 +0900198 }
199 llndk_library {
200 name: "libm",
201 symbol_file: "",
Colin Crossc511bc52020-04-07 16:50:32 +0000202 sdk_version: "current",
Inseob Kimc0907f12019-02-08 21:00:45 +0900203 }
Ivan Lozanoa0cd8f92020-04-09 09:56:02 -0400204
205 // Coverage libraries
206 cc_library {
207 name: "libprofile-extras",
208 vendor_available: true,
209 recovery_available: true,
210 native_coverage: false,
211 system_shared_libs: [],
212 stl: "none",
213 notice: "custom_notice",
214 }
215 cc_library {
216 name: "libprofile-clang-extras",
217 vendor_available: true,
218 recovery_available: true,
219 native_coverage: false,
220 system_shared_libs: [],
221 stl: "none",
222 notice: "custom_notice",
223 }
224 cc_library {
225 name: "libprofile-extras_ndk",
226 vendor_available: true,
227 native_coverage: false,
228 system_shared_libs: [],
229 stl: "none",
230 notice: "custom_notice",
231 sdk_version: "current",
232 }
233 cc_library {
234 name: "libprofile-clang-extras_ndk",
235 vendor_available: true,
236 native_coverage: false,
237 system_shared_libs: [],
238 stl: "none",
239 notice: "custom_notice",
240 sdk_version: "current",
241 }
242
Inseob Kimc0907f12019-02-08 21:00:45 +0900243 cc_library {
244 name: "libdl",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100245 defaults: ["linux_bionic_supported"],
Yi Konge7fe9912019-06-02 00:53:50 -0700246 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900247 nocrt: true,
Peter Collingbournee5ba2862019-12-10 18:37:45 -0800248 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900249 system_shared_libs: [],
250 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800251 stubs: {
252 versions: ["27", "28", "29"],
253 },
254 apex_available: [
255 "//apex_available:platform",
256 "myapex"
257 ],
Inseob Kimc0907f12019-02-08 21:00:45 +0900258 }
259 llndk_library {
260 name: "libdl",
261 symbol_file: "",
Colin Crossc511bc52020-04-07 16:50:32 +0000262 sdk_version: "current",
Inseob Kimc0907f12019-02-08 21:00:45 +0900263 }
264 cc_library {
Jooyung Han097087b2019-10-22 19:32:18 +0900265 name: "libft2",
266 no_libcrt: true,
267 nocrt: true,
268 system_shared_libs: [],
269 recovery_available: true,
270 }
271 llndk_library {
272 name: "libft2",
273 symbol_file: "",
274 vendor_available: false,
Colin Crossc511bc52020-04-07 16:50:32 +0000275 sdk_version: "current",
Jooyung Han097087b2019-10-22 19:32:18 +0900276 }
277 cc_library {
Inseob Kimc0907f12019-02-08 21:00:45 +0900278 name: "libc++_static",
Yi Konge7fe9912019-06-02 00:53:50 -0700279 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900280 nocrt: true,
281 system_shared_libs: [],
282 stl: "none",
283 vendor_available: true,
284 recovery_available: true,
Inseob Kim89db15d2020-02-03 18:06:46 +0900285 host_supported: true,
Jooyung Han749dc692020-04-15 11:03:39 +0900286 min_sdk_version: "29",
Jiyong Park541142c2020-03-07 16:35:46 +0900287 apex_available: [
288 "//apex_available:platform",
289 "//apex_available:anyapex",
290 ],
Inseob Kimc0907f12019-02-08 21:00:45 +0900291 }
292 cc_library {
293 name: "libc++",
Yi Konge7fe9912019-06-02 00:53:50 -0700294 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900295 nocrt: true,
296 system_shared_libs: [],
297 stl: "none",
298 vendor_available: true,
299 recovery_available: true,
Inseob Kim89db15d2020-02-03 18:06:46 +0900300 host_supported: true,
Jooyung Han749dc692020-04-15 11:03:39 +0900301 min_sdk_version: "29",
Inseob Kimc0907f12019-02-08 21:00:45 +0900302 vndk: {
303 enabled: true,
304 support_system_process: true,
305 },
Colin Crossf9aabd72020-02-15 11:29:50 -0800306 apex_available: [
307 "//apex_available:platform",
308 "myapex"
309 ],
Inseob Kimc0907f12019-02-08 21:00:45 +0900310 }
311 cc_library {
Dan Albert2da19cb2019-07-24 12:17:40 -0700312 name: "libc++demangle",
313 no_libcrt: true,
314 nocrt: true,
315 system_shared_libs: [],
316 stl: "none",
317 host_supported: false,
318 vendor_available: true,
319 recovery_available: true,
Jooyung Han749dc692020-04-15 11:03:39 +0900320 min_sdk_version: "29",
Jiyong Park541142c2020-03-07 16:35:46 +0900321 apex_available: [
322 "//apex_available:platform",
323 "//apex_available:anyapex",
324 ],
Dan Albert2da19cb2019-07-24 12:17:40 -0700325 }
326 cc_library {
Inseob Kimc0907f12019-02-08 21:00:45 +0900327 name: "libunwind_llvm",
Yi Konge7fe9912019-06-02 00:53:50 -0700328 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900329 nocrt: true,
330 system_shared_libs: [],
331 stl: "none",
332 vendor_available: true,
333 recovery_available: true,
334 }
335
Jiyong Park541142c2020-03-07 16:35:46 +0900336 cc_defaults {
337 name: "crt_defaults",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100338 defaults: ["linux_bionic_supported"],
Jiyong Park541142c2020-03-07 16:35:46 +0900339 recovery_available: true,
340 vendor_available: true,
341 native_bridge_supported: true,
342 stl: "none",
343 apex_available: [
344 "//apex_available:platform",
345 "//apex_available:anyapex",
346 ],
347 }
348
Inseob Kimc0907f12019-02-08 21:00:45 +0900349 cc_object {
350 name: "crtbegin_so",
Jiyong Park541142c2020-03-07 16:35:46 +0900351 defaults: ["crt_defaults"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900352 recovery_available: true,
353 vendor_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800354 native_bridge_supported: true,
Jooyung Han749dc692020-04-15 11:03:39 +0900355 min_sdk_version: "29",
Jiyong Parka7bc8ad2019-10-15 15:20:07 +0900356 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900357 }
358
359 cc_object {
Colin Cross815daf92019-05-14 16:05:20 -0700360 name: "crtbegin_dynamic",
Jiyong Park541142c2020-03-07 16:35:46 +0900361 defaults: ["crt_defaults"],
Colin Cross815daf92019-05-14 16:05:20 -0700362 recovery_available: true,
363 vendor_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800364 native_bridge_supported: true,
365 stl: "none",
Colin Cross815daf92019-05-14 16:05:20 -0700366 }
367
368 cc_object {
Inseob Kimc0907f12019-02-08 21:00:45 +0900369 name: "crtbegin_static",
Jiyong Park541142c2020-03-07 16:35:46 +0900370 defaults: ["crt_defaults"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900371 recovery_available: true,
372 vendor_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800373 native_bridge_supported: true,
374 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900375 }
376
377 cc_object {
378 name: "crtend_so",
Jiyong Park541142c2020-03-07 16:35:46 +0900379 defaults: ["crt_defaults"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900380 recovery_available: true,
381 vendor_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800382 native_bridge_supported: true,
Jooyung Han749dc692020-04-15 11:03:39 +0900383 min_sdk_version: "29",
Jiyong Parka7bc8ad2019-10-15 15:20:07 +0900384 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900385 }
386
387 cc_object {
388 name: "crtend_android",
Jiyong Park541142c2020-03-07 16:35:46 +0900389 defaults: ["crt_defaults"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900390 recovery_available: true,
391 vendor_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800392 native_bridge_supported: true,
393 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900394 }
395
396 cc_library {
397 name: "libprotobuf-cpp-lite",
398 }
Colin Crossf28329d2020-02-15 11:00:10 -0800399
400 cc_library {
401 name: "ndk_libunwind",
402 sdk_version: "current",
403 stl: "none",
404 system_shared_libs: [],
405 }
406
Dan Albertde5aade2020-06-30 12:32:51 -0700407 ndk_library {
408 name: "libc",
409 first_version: "minimum",
410 symbol_file: "libc.map.txt",
Colin Crossf28329d2020-02-15 11:00:10 -0800411 }
412
Dan Albertde5aade2020-06-30 12:32:51 -0700413 ndk_library {
414 name: "libm",
415 first_version: "minimum",
416 symbol_file: "libm.map.txt",
Colin Crossf28329d2020-02-15 11:00:10 -0800417 }
418
Dan Albertde5aade2020-06-30 12:32:51 -0700419 ndk_library {
420 name: "libdl",
421 first_version: "minimum",
422 symbol_file: "libdl.map.txt",
Colin Crossf28329d2020-02-15 11:00:10 -0800423 }
424
425 ndk_prebuilt_object {
426 name: "ndk_crtbegin_so.27",
427 sdk_version: "27",
428 }
429
430 ndk_prebuilt_object {
431 name: "ndk_crtend_so.27",
432 sdk_version: "27",
433 }
434
Colin Crossc511bc52020-04-07 16:50:32 +0000435 ndk_prebuilt_object {
436 name: "ndk_crtbegin_dynamic.27",
437 sdk_version: "27",
438 }
439
440 ndk_prebuilt_object {
441 name: "ndk_crtend_android.27",
442 sdk_version: "27",
443 }
444
Colin Crossf28329d2020-02-15 11:00:10 -0800445 ndk_prebuilt_shared_stl {
446 name: "ndk_libc++_shared",
447 }
448 `
449
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100450 supportLinuxBionic := false
Paul Duffina04c1072020-03-02 10:16:35 +0000451 for _, os := range oses {
452 if os == android.Fuchsia {
453 ret += `
Inseob Kimc0907f12019-02-08 21:00:45 +0900454 cc_library {
455 name: "libbioniccompat",
456 stl: "none",
457 }
458 cc_library {
459 name: "libcompiler_rt",
460 stl: "none",
461 }
462 `
Paul Duffina04c1072020-03-02 10:16:35 +0000463 }
464 if os == android.Windows {
465 ret += `
466 toolchain_library {
467 name: "libwinpthread",
468 host_supported: true,
469 enabled: false,
470 target: {
471 windows: {
472 enabled: true,
473 },
474 },
475 src: "",
476 }
477 `
478 }
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100479 if os == android.LinuxBionic {
480 supportLinuxBionic = true
481 ret += `
482 cc_binary {
483 name: "linker",
484 defaults: ["linux_bionic_supported"],
485 recovery_available: true,
486 stl: "none",
487 nocrt: true,
488 static_executable: true,
489 native_coverage: false,
490 system_shared_libs: [],
491 }
492
493 cc_genrule {
494 name: "host_bionic_linker_flags",
495 host_supported: true,
496 device_supported: false,
497 target: {
498 host: {
499 enabled: false,
500 },
501 linux_bionic: {
502 enabled: true,
503 },
504 },
505 out: ["linker.flags"],
506 }
507
508 cc_defaults {
509 name: "linux_bionic_supported",
510 host_supported: true,
511 target: {
512 host: {
513 enabled: false,
514 },
515 linux_bionic: {
516 enabled: true,
517 },
518 },
519 }
520 `
521 }
Inseob Kimc0907f12019-02-08 21:00:45 +0900522 }
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100523
524 if !supportLinuxBionic {
525 ret += `
526 cc_defaults {
527 name: "linux_bionic_supported",
528 }
529 `
530 }
531
Inseob Kimc0907f12019-02-08 21:00:45 +0900532 return ret
533}
Colin Cross9a942872019-05-14 15:44:26 -0700534
Colin Crossf28329d2020-02-15 11:00:10 -0800535func GatherRequiredFilesForTest(fs map[string][]byte) {
Colin Crossf28329d2020-02-15 11:00:10 -0800536}
537
Colin Cross98be1bb2019-12-13 20:41:13 -0800538func TestConfig(buildDir string, os android.OsType, env map[string]string,
539 bp string, fs map[string][]byte) android.Config {
Colin Cross9a942872019-05-14 15:44:26 -0700540
Colin Cross98be1bb2019-12-13 20:41:13 -0800541 // add some modules that are required by the compiler and/or linker
542 bp = bp + GatherRequiredDepsForTest(os)
543
Colin Cross2fce23a2020-06-07 17:02:48 -0700544 mockFS := map[string][]byte{}
Colin Cross98be1bb2019-12-13 20:41:13 -0800545
Colin Crossf28329d2020-02-15 11:00:10 -0800546 GatherRequiredFilesForTest(mockFS)
547
Colin Cross98be1bb2019-12-13 20:41:13 -0800548 for k, v := range fs {
549 mockFS[k] = v
550 }
551
552 var config android.Config
553 if os == android.Fuchsia {
554 config = android.TestArchConfigFuchsia(buildDir, env, bp, mockFS)
555 } else {
556 config = android.TestArchConfig(buildDir, env, bp, mockFS)
557 }
558
559 return config
560}
561
562func CreateTestContext() *android.TestContext {
Colin Cross9a942872019-05-14 15:44:26 -0700563 ctx := android.NewTestArchContext()
Colin Cross4b49b762019-11-22 15:25:03 -0800564 ctx.RegisterModuleType("cc_fuzz", FuzzFactory)
Colin Cross4b49b762019-11-22 15:25:03 -0800565 ctx.RegisterModuleType("cc_test", TestFactory)
Chris Parsons79d66a52020-06-05 17:26:16 -0400566 ctx.RegisterModuleType("cc_test_library", TestLibraryFactory)
Colin Cross4b49b762019-11-22 15:25:03 -0800567 ctx.RegisterModuleType("llndk_headers", llndkHeadersFactory)
568 ctx.RegisterModuleType("vendor_public_library", vendorPublicLibraryFactory)
Colin Cross4b49b762019-11-22 15:25:03 -0800569 ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
570 ctx.RegisterModuleType("vndk_prebuilt_shared", VndkPrebuiltSharedFactory)
571 ctx.RegisterModuleType("vndk_libraries_txt", VndkLibrariesTxtFactory)
Colin Crosse1bb5d02019-09-24 14:55:04 -0700572 ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators)
Paul Duffinc988c8e2020-04-29 18:27:14 +0100573 RegisterRequiredBuildComponentsForTest(ctx)
Colin Cross4b49b762019-11-22 15:25:03 -0800574 ctx.RegisterSingletonType("vndk-snapshot", VndkSnapshotSingleton)
Inseob Kim8471cda2019-11-15 09:59:12 +0900575 ctx.RegisterSingletonType("vendor-snapshot", VendorSnapshotSingleton)
Colin Cross9a942872019-05-14 15:44:26 -0700576
Colin Cross9a942872019-05-14 15:44:26 -0700577 return ctx
578}