blob: c2353d8e6b726d080dd655b2dd3f2d3513e14a76 [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 Duffin036e7002019-12-19 19:16:28 +000023 RegisterCCBuildComponents(ctx)
Paul Duffin2ee69792020-01-16 12:14:42 +000024 RegisterBinaryBuildComponents(ctx)
Paul Duffin6c26dc72019-12-19 15:02:40 +000025 RegisterLibraryBuildComponents(ctx)
Paul Duffin1c6c1c72020-02-21 10:28:43 +000026 RegisterLibraryHeadersBuildComponents(ctx)
Paul Duffin6c26dc72019-12-19 15:02:40 +000027
28 ctx.RegisterModuleType("toolchain_library", ToolchainLibraryFactory)
29 ctx.RegisterModuleType("llndk_library", LlndkLibraryFactory)
30 ctx.RegisterModuleType("cc_object", ObjectFactory)
Martin Stjernholm7feceb22020-07-11 04:33:29 +010031 ctx.RegisterModuleType("cc_genrule", genRuleFactory)
Colin Crossf28329d2020-02-15 11:00:10 -080032 ctx.RegisterModuleType("ndk_prebuilt_shared_stl", NdkPrebuiltSharedStlFactory)
33 ctx.RegisterModuleType("ndk_prebuilt_object", NdkPrebuiltObjectFactory)
Dan Albertde5aade2020-06-30 12:32:51 -070034 ctx.RegisterModuleType("ndk_library", NdkLibraryFactory)
Paul Duffin77980a82019-12-19 16:01:36 +000035}
36
Paul Duffina04c1072020-03-02 10:16:35 +000037func GatherRequiredDepsForTest(oses ...android.OsType) string {
Inseob Kimc0907f12019-02-08 21:00:45 +090038 ret := `
39 toolchain_library {
40 name: "libatomic",
Martin Stjernholm7feceb22020-07-11 04:33:29 +010041 defaults: ["linux_bionic_supported"],
Inseob Kimc0907f12019-02-08 21:00:45 +090042 vendor_available: true,
43 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -080044 native_bridge_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +090045 src: "",
46 }
47
48 toolchain_library {
49 name: "libcompiler_rt-extras",
50 vendor_available: true,
51 recovery_available: true,
52 src: "",
53 }
54
55 toolchain_library {
56 name: "libclang_rt.builtins-arm-android",
57 vendor_available: true,
58 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -080059 native_bridge_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +090060 src: "",
61 }
62
63 toolchain_library {
64 name: "libclang_rt.builtins-aarch64-android",
65 vendor_available: true,
66 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -080067 native_bridge_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +090068 src: "",
69 }
70
Jooyung Han75568392020-03-20 04:29:24 +090071 cc_prebuilt_library_shared {
72 name: "libclang_rt.hwasan-aarch64-android",
73 nocrt: true,
74 vendor_available: true,
75 recovery_available: true,
76 system_shared_libs: [],
77 stl: "none",
78 srcs: [""],
79 check_elf_files: false,
80 sanitize: {
81 never: true,
82 },
83 }
84
Inseob Kimc0907f12019-02-08 21:00:45 +090085 toolchain_library {
86 name: "libclang_rt.builtins-i686-android",
87 vendor_available: true,
88 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -080089 native_bridge_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +090090 src: "",
91 }
92
93 toolchain_library {
94 name: "libclang_rt.builtins-x86_64-android",
Martin Stjernholm7feceb22020-07-11 04:33:29 +010095 defaults: ["linux_bionic_supported"],
Inseob Kimc0907f12019-02-08 21:00:45 +090096 vendor_available: true,
97 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -080098 native_bridge_supported: true,
Inseob Kimc0907f12019-02-08 21:00:45 +090099 src: "",
100 }
101
102 toolchain_library {
Mitch Phillipsda9a4632019-07-15 09:34:09 -0700103 name: "libclang_rt.fuzzer-arm-android",
104 vendor_available: true,
105 recovery_available: true,
106 src: "",
107 }
108
109 toolchain_library {
110 name: "libclang_rt.fuzzer-aarch64-android",
111 vendor_available: true,
112 recovery_available: true,
113 src: "",
114 }
115
116 toolchain_library {
117 name: "libclang_rt.fuzzer-i686-android",
118 vendor_available: true,
119 recovery_available: true,
120 src: "",
121 }
122
123 toolchain_library {
124 name: "libclang_rt.fuzzer-x86_64-android",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100125 defaults: ["linux_bionic_supported"],
Mitch Phillipsda9a4632019-07-15 09:34:09 -0700126 vendor_available: true,
127 recovery_available: true,
128 src: "",
129 }
130
131 toolchain_library {
132 name: "libclang_rt.fuzzer-x86_64",
133 vendor_available: true,
134 recovery_available: true,
135 src: "",
136 }
137
Paul Duffind6867912019-12-19 14:38:36 +0000138 // Needed for sanitizer
139 cc_prebuilt_library_shared {
140 name: "libclang_rt.ubsan_standalone-aarch64-android",
141 vendor_available: true,
142 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800143 system_shared_libs: [],
Paul Duffind6867912019-12-19 14:38:36 +0000144 srcs: [""],
145 }
146
Mitch Phillipsda9a4632019-07-15 09:34:09 -0700147 toolchain_library {
Inseob Kimc0907f12019-02-08 21:00:45 +0900148 name: "libgcc",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100149 defaults: ["linux_bionic_supported"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900150 vendor_available: true,
151 recovery_available: true,
152 src: "",
153 }
154
Yi Kongacee27c2019-03-29 20:05:14 -0700155 toolchain_library {
156 name: "libgcc_stripped",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100157 defaults: ["linux_bionic_supported"],
Yi Kongacee27c2019-03-29 20:05:14 -0700158 vendor_available: true,
159 recovery_available: true,
Colin Crossc511bc52020-04-07 16:50:32 +0000160 sdk_version: "current",
Yi Kongacee27c2019-03-29 20:05:14 -0700161 src: "",
162 }
163
Inseob Kimc0907f12019-02-08 21:00:45 +0900164 cc_library {
Inseob Kimc0907f12019-02-08 21:00:45 +0900165 name: "libc",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100166 defaults: ["linux_bionic_supported"],
Yi Konge7fe9912019-06-02 00:53:50 -0700167 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900168 nocrt: true,
Peter Collingbournee5ba2862019-12-10 18:37:45 -0800169 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900170 system_shared_libs: [],
171 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800172 stubs: {
173 versions: ["27", "28", "29"],
174 },
Inseob Kimc0907f12019-02-08 21:00:45 +0900175 }
176 llndk_library {
177 name: "libc",
178 symbol_file: "",
Colin Crossc511bc52020-04-07 16:50:32 +0000179 sdk_version: "current",
Inseob Kimc0907f12019-02-08 21:00:45 +0900180 }
181 cc_library {
182 name: "libm",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100183 defaults: ["linux_bionic_supported"],
Yi Konge7fe9912019-06-02 00:53:50 -0700184 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900185 nocrt: true,
Peter Collingbournee5ba2862019-12-10 18:37:45 -0800186 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900187 system_shared_libs: [],
188 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800189 stubs: {
190 versions: ["27", "28", "29"],
191 },
192 apex_available: [
193 "//apex_available:platform",
194 "myapex"
195 ],
Inseob Kimc0907f12019-02-08 21:00:45 +0900196 }
197 llndk_library {
198 name: "libm",
199 symbol_file: "",
Colin Crossc511bc52020-04-07 16:50:32 +0000200 sdk_version: "current",
Inseob Kimc0907f12019-02-08 21:00:45 +0900201 }
Ivan Lozanoa0cd8f92020-04-09 09:56:02 -0400202
203 // Coverage libraries
204 cc_library {
205 name: "libprofile-extras",
206 vendor_available: true,
207 recovery_available: true,
208 native_coverage: false,
209 system_shared_libs: [],
210 stl: "none",
211 notice: "custom_notice",
212 }
213 cc_library {
214 name: "libprofile-clang-extras",
215 vendor_available: true,
216 recovery_available: true,
217 native_coverage: false,
218 system_shared_libs: [],
219 stl: "none",
220 notice: "custom_notice",
221 }
222 cc_library {
223 name: "libprofile-extras_ndk",
224 vendor_available: true,
225 native_coverage: false,
226 system_shared_libs: [],
227 stl: "none",
228 notice: "custom_notice",
229 sdk_version: "current",
230 }
231 cc_library {
232 name: "libprofile-clang-extras_ndk",
233 vendor_available: true,
234 native_coverage: false,
235 system_shared_libs: [],
236 stl: "none",
237 notice: "custom_notice",
238 sdk_version: "current",
239 }
240
Inseob Kimc0907f12019-02-08 21:00:45 +0900241 cc_library {
242 name: "libdl",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100243 defaults: ["linux_bionic_supported"],
Yi Konge7fe9912019-06-02 00:53:50 -0700244 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900245 nocrt: true,
Peter Collingbournee5ba2862019-12-10 18:37:45 -0800246 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900247 system_shared_libs: [],
248 recovery_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800249 stubs: {
250 versions: ["27", "28", "29"],
251 },
252 apex_available: [
253 "//apex_available:platform",
254 "myapex"
255 ],
Inseob Kimc0907f12019-02-08 21:00:45 +0900256 }
257 llndk_library {
258 name: "libdl",
259 symbol_file: "",
Colin Crossc511bc52020-04-07 16:50:32 +0000260 sdk_version: "current",
Inseob Kimc0907f12019-02-08 21:00:45 +0900261 }
262 cc_library {
Jooyung Han097087b2019-10-22 19:32:18 +0900263 name: "libft2",
264 no_libcrt: true,
265 nocrt: true,
266 system_shared_libs: [],
267 recovery_available: true,
268 }
269 llndk_library {
270 name: "libft2",
271 symbol_file: "",
272 vendor_available: false,
Colin Crossc511bc52020-04-07 16:50:32 +0000273 sdk_version: "current",
Jooyung Han097087b2019-10-22 19:32:18 +0900274 }
275 cc_library {
Inseob Kimc0907f12019-02-08 21:00:45 +0900276 name: "libc++_static",
Yi Konge7fe9912019-06-02 00:53:50 -0700277 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900278 nocrt: true,
279 system_shared_libs: [],
280 stl: "none",
281 vendor_available: true,
282 recovery_available: true,
Inseob Kim89db15d2020-02-03 18:06:46 +0900283 host_supported: true,
Jooyung Han749dc692020-04-15 11:03:39 +0900284 min_sdk_version: "29",
Jiyong Park541142c2020-03-07 16:35:46 +0900285 apex_available: [
286 "//apex_available:platform",
287 "//apex_available:anyapex",
288 ],
Inseob Kimc0907f12019-02-08 21:00:45 +0900289 }
290 cc_library {
291 name: "libc++",
Yi Konge7fe9912019-06-02 00:53:50 -0700292 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900293 nocrt: true,
294 system_shared_libs: [],
295 stl: "none",
296 vendor_available: true,
297 recovery_available: true,
Inseob Kim89db15d2020-02-03 18:06:46 +0900298 host_supported: true,
Jooyung Han749dc692020-04-15 11:03:39 +0900299 min_sdk_version: "29",
Inseob Kimc0907f12019-02-08 21:00:45 +0900300 vndk: {
301 enabled: true,
302 support_system_process: true,
303 },
Colin Crossf9aabd72020-02-15 11:29:50 -0800304 apex_available: [
305 "//apex_available:platform",
306 "myapex"
307 ],
Inseob Kimc0907f12019-02-08 21:00:45 +0900308 }
309 cc_library {
Dan Albert2da19cb2019-07-24 12:17:40 -0700310 name: "libc++demangle",
311 no_libcrt: true,
312 nocrt: true,
313 system_shared_libs: [],
314 stl: "none",
315 host_supported: false,
316 vendor_available: true,
317 recovery_available: true,
Jooyung Han749dc692020-04-15 11:03:39 +0900318 min_sdk_version: "29",
Jiyong Park541142c2020-03-07 16:35:46 +0900319 apex_available: [
320 "//apex_available:platform",
321 "//apex_available:anyapex",
322 ],
Dan Albert2da19cb2019-07-24 12:17:40 -0700323 }
324 cc_library {
Inseob Kimc0907f12019-02-08 21:00:45 +0900325 name: "libunwind_llvm",
Yi Konge7fe9912019-06-02 00:53:50 -0700326 no_libcrt: true,
Inseob Kimc0907f12019-02-08 21:00:45 +0900327 nocrt: true,
328 system_shared_libs: [],
329 stl: "none",
330 vendor_available: true,
331 recovery_available: true,
332 }
333
Jiyong Park541142c2020-03-07 16:35:46 +0900334 cc_defaults {
335 name: "crt_defaults",
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100336 defaults: ["linux_bionic_supported"],
Jiyong Park541142c2020-03-07 16:35:46 +0900337 recovery_available: true,
338 vendor_available: true,
339 native_bridge_supported: true,
340 stl: "none",
341 apex_available: [
342 "//apex_available:platform",
343 "//apex_available:anyapex",
344 ],
345 }
346
Inseob Kimc0907f12019-02-08 21:00:45 +0900347 cc_object {
348 name: "crtbegin_so",
Jiyong Park541142c2020-03-07 16:35:46 +0900349 defaults: ["crt_defaults"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900350 recovery_available: true,
351 vendor_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800352 native_bridge_supported: true,
Jooyung Han749dc692020-04-15 11:03:39 +0900353 min_sdk_version: "29",
Jiyong Parka7bc8ad2019-10-15 15:20:07 +0900354 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900355 }
356
357 cc_object {
Colin Cross815daf92019-05-14 16:05:20 -0700358 name: "crtbegin_dynamic",
Jiyong Park541142c2020-03-07 16:35:46 +0900359 defaults: ["crt_defaults"],
Colin Cross815daf92019-05-14 16:05:20 -0700360 recovery_available: true,
361 vendor_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800362 native_bridge_supported: true,
363 stl: "none",
Colin Cross815daf92019-05-14 16:05:20 -0700364 }
365
366 cc_object {
Inseob Kimc0907f12019-02-08 21:00:45 +0900367 name: "crtbegin_static",
Jiyong Park541142c2020-03-07 16:35:46 +0900368 defaults: ["crt_defaults"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900369 recovery_available: true,
370 vendor_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800371 native_bridge_supported: true,
372 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900373 }
374
375 cc_object {
376 name: "crtend_so",
Jiyong Park541142c2020-03-07 16:35:46 +0900377 defaults: ["crt_defaults"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900378 recovery_available: true,
379 vendor_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800380 native_bridge_supported: true,
Jooyung Han749dc692020-04-15 11:03:39 +0900381 min_sdk_version: "29",
Jiyong Parka7bc8ad2019-10-15 15:20:07 +0900382 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900383 }
384
385 cc_object {
386 name: "crtend_android",
Jiyong Park541142c2020-03-07 16:35:46 +0900387 defaults: ["crt_defaults"],
Inseob Kimc0907f12019-02-08 21:00:45 +0900388 recovery_available: true,
389 vendor_available: true,
Colin Crossf9aabd72020-02-15 11:29:50 -0800390 native_bridge_supported: true,
391 stl: "none",
Inseob Kimc0907f12019-02-08 21:00:45 +0900392 }
393
394 cc_library {
395 name: "libprotobuf-cpp-lite",
396 }
Colin Crossf28329d2020-02-15 11:00:10 -0800397
398 cc_library {
399 name: "ndk_libunwind",
400 sdk_version: "current",
401 stl: "none",
402 system_shared_libs: [],
403 }
404
Dan Albertde5aade2020-06-30 12:32:51 -0700405 ndk_library {
406 name: "libc",
407 first_version: "minimum",
408 symbol_file: "libc.map.txt",
Colin Crossf28329d2020-02-15 11:00:10 -0800409 }
410
Dan Albertde5aade2020-06-30 12:32:51 -0700411 ndk_library {
412 name: "libm",
413 first_version: "minimum",
414 symbol_file: "libm.map.txt",
Colin Crossf28329d2020-02-15 11:00:10 -0800415 }
416
Dan Albertde5aade2020-06-30 12:32:51 -0700417 ndk_library {
418 name: "libdl",
419 first_version: "minimum",
420 symbol_file: "libdl.map.txt",
Colin Crossf28329d2020-02-15 11:00:10 -0800421 }
422
423 ndk_prebuilt_object {
424 name: "ndk_crtbegin_so.27",
425 sdk_version: "27",
426 }
427
428 ndk_prebuilt_object {
429 name: "ndk_crtend_so.27",
430 sdk_version: "27",
431 }
432
Colin Crossc511bc52020-04-07 16:50:32 +0000433 ndk_prebuilt_object {
434 name: "ndk_crtbegin_dynamic.27",
435 sdk_version: "27",
436 }
437
438 ndk_prebuilt_object {
439 name: "ndk_crtend_android.27",
440 sdk_version: "27",
441 }
442
Colin Crossf28329d2020-02-15 11:00:10 -0800443 ndk_prebuilt_shared_stl {
444 name: "ndk_libc++_shared",
445 }
446 `
447
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100448 supportLinuxBionic := false
Paul Duffina04c1072020-03-02 10:16:35 +0000449 for _, os := range oses {
450 if os == android.Fuchsia {
451 ret += `
Inseob Kimc0907f12019-02-08 21:00:45 +0900452 cc_library {
453 name: "libbioniccompat",
454 stl: "none",
455 }
456 cc_library {
457 name: "libcompiler_rt",
458 stl: "none",
459 }
460 `
Paul Duffina04c1072020-03-02 10:16:35 +0000461 }
462 if os == android.Windows {
463 ret += `
464 toolchain_library {
465 name: "libwinpthread",
466 host_supported: true,
467 enabled: false,
468 target: {
469 windows: {
470 enabled: true,
471 },
472 },
473 src: "",
474 }
475 `
476 }
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100477 if os == android.LinuxBionic {
478 supportLinuxBionic = true
479 ret += `
480 cc_binary {
481 name: "linker",
482 defaults: ["linux_bionic_supported"],
483 recovery_available: true,
484 stl: "none",
485 nocrt: true,
486 static_executable: true,
487 native_coverage: false,
488 system_shared_libs: [],
489 }
490
491 cc_genrule {
492 name: "host_bionic_linker_flags",
493 host_supported: true,
494 device_supported: false,
495 target: {
496 host: {
497 enabled: false,
498 },
499 linux_bionic: {
500 enabled: true,
501 },
502 },
503 out: ["linker.flags"],
504 }
505
506 cc_defaults {
507 name: "linux_bionic_supported",
508 host_supported: true,
509 target: {
510 host: {
511 enabled: false,
512 },
513 linux_bionic: {
514 enabled: true,
515 },
516 },
517 }
518 `
519 }
Inseob Kimc0907f12019-02-08 21:00:45 +0900520 }
Martin Stjernholm7feceb22020-07-11 04:33:29 +0100521
522 if !supportLinuxBionic {
523 ret += `
524 cc_defaults {
525 name: "linux_bionic_supported",
526 }
527 `
528 }
529
Inseob Kimc0907f12019-02-08 21:00:45 +0900530 return ret
531}
Colin Cross9a942872019-05-14 15:44:26 -0700532
Colin Crossf28329d2020-02-15 11:00:10 -0800533func GatherRequiredFilesForTest(fs map[string][]byte) {
Colin Crossf28329d2020-02-15 11:00:10 -0800534}
535
Colin Cross98be1bb2019-12-13 20:41:13 -0800536func TestConfig(buildDir string, os android.OsType, env map[string]string,
537 bp string, fs map[string][]byte) android.Config {
Colin Cross9a942872019-05-14 15:44:26 -0700538
Colin Cross98be1bb2019-12-13 20:41:13 -0800539 // add some modules that are required by the compiler and/or linker
540 bp = bp + GatherRequiredDepsForTest(os)
541
Colin Cross2fce23a2020-06-07 17:02:48 -0700542 mockFS := map[string][]byte{}
Colin Cross98be1bb2019-12-13 20:41:13 -0800543
Colin Crossf28329d2020-02-15 11:00:10 -0800544 GatherRequiredFilesForTest(mockFS)
545
Colin Cross98be1bb2019-12-13 20:41:13 -0800546 for k, v := range fs {
547 mockFS[k] = v
548 }
549
550 var config android.Config
551 if os == android.Fuchsia {
552 config = android.TestArchConfigFuchsia(buildDir, env, bp, mockFS)
553 } else {
554 config = android.TestArchConfig(buildDir, env, bp, mockFS)
555 }
556
557 return config
558}
559
560func CreateTestContext() *android.TestContext {
Colin Cross9a942872019-05-14 15:44:26 -0700561 ctx := android.NewTestArchContext()
Colin Cross4b49b762019-11-22 15:25:03 -0800562 ctx.RegisterModuleType("cc_fuzz", FuzzFactory)
Colin Cross4b49b762019-11-22 15:25:03 -0800563 ctx.RegisterModuleType("cc_test", TestFactory)
Chris Parsons79d66a52020-06-05 17:26:16 -0400564 ctx.RegisterModuleType("cc_test_library", TestLibraryFactory)
Colin Cross4b49b762019-11-22 15:25:03 -0800565 ctx.RegisterModuleType("llndk_headers", llndkHeadersFactory)
566 ctx.RegisterModuleType("vendor_public_library", vendorPublicLibraryFactory)
Colin Cross4b49b762019-11-22 15:25:03 -0800567 ctx.RegisterModuleType("filegroup", android.FileGroupFactory)
568 ctx.RegisterModuleType("vndk_prebuilt_shared", VndkPrebuiltSharedFactory)
569 ctx.RegisterModuleType("vndk_libraries_txt", VndkLibrariesTxtFactory)
Colin Crosse1bb5d02019-09-24 14:55:04 -0700570 ctx.PreArchMutators(android.RegisterDefaultsPreArchMutators)
Paul Duffin021f4e52020-07-30 16:04:17 +0100571 android.RegisterPrebuiltMutators(ctx)
Paul Duffinc988c8e2020-04-29 18:27:14 +0100572 RegisterRequiredBuildComponentsForTest(ctx)
Colin Cross4b49b762019-11-22 15:25:03 -0800573 ctx.RegisterSingletonType("vndk-snapshot", VndkSnapshotSingleton)
Inseob Kim8471cda2019-11-15 09:59:12 +0900574 ctx.RegisterSingletonType("vendor-snapshot", VendorSnapshotSingleton)
Colin Cross9a942872019-05-14 15:44:26 -0700575
Colin Cross9a942872019-05-14 15:44:26 -0700576 return ctx
577}