• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1{
2  "target_cpu": {
3    "arg_name": "--target-cpu",
4    "argDefault": "arm",
5    "arg_help": "Default:''. Help:Specifies the desired cpu architecture for the build, each may support different cpu architectures, run 'hb set --all' to list product all supported cpu architectures",
6    "arg_phase": "prebuild",
7    "arg_type": "str",
8    "arg_attribute": {
9      "optional": [
10        "arm",
11        "arm64",
12        "x86_64",
13        "x64",
14        "mipsel",
15        "riscv64"
16      ]
17    },
18    "resolve_function": "resolve_target_cpu",
19    "testFunction": "testBuildTargetCpu"
20  },
21  "target_os": {
22    "arg_name": "--target-os",
23    "argDefault": "ohos",
24    "arg_help": "Default:''. Help:Specifies the desired os type for the build, each may support different os type, run 'hb set --all' to list product all supported os type",
25    "arg_phase": "prebuild",
26    "arg_type": "str",
27    "arg_attribute": {
28      "optional": [
29        "android",
30        "ios"
31      ]
32    },
33    "resolve_function": "resolve_target_os",
34    "testFunction": "testBuildTargetOs"
35  },
36  "product_name": {
37    "arg_name": "--product-name",
38    "argDefault": "",
39    "arg_help": "Default:''. Help:Build a specified product. You could use this option like this: 1.'hb build --product-name rk3568@hihope' 2.'hb build --product-name rk3568'",
40    "arg_phase": "prebuild",
41    "arg_type": "str",
42    "arg_attribute": {
43      "abbreviation": "-p"
44    },
45    "resolve_function": "resolve_product",
46    "testFunction": "testProduct"
47  },
48  "rename_last_log": {
49    "arg_name": "--rename-last-log",
50    "argDefault": true,
51    "arg_help": "Default:True. Help:You can use it to decide whether to keep the last build log",
52    "arg_phase": "prebuild",
53    "arg_type": "bool",
54    "arg_attribute": {},
55    "resolve_function": "resolve_rename_last_log",
56    "testFunction": "testRenameLastLog"
57  },
58  "log_mode": {
59    "arg_name": "--log-mode",
60    "argDefault": "normal",
61    "arg_help": "Default:'normal'. Help:You can use this option to determine whether to use single-line refresh log mode",
62    "arg_phase": "prebuild",
63    "arg_type": "str",
64    "arg_attribute": {
65      "optional": [
66        "normal",
67        "silent"
68      ]
69    },
70    "resolve_function": "resolve_log_mode",
71    "testFunction": "testLogMode"
72  },
73  "precise_branch": {
74    "arg_name": "--precise-branch",
75    "argDefault": "dayu200_tdd",
76    "arg_help": "Default:'dayu200_tdd'. Help:You can use this option to select the dayu200_tdd branch",
77    "arg_phase": "prebuild",
78    "arg_type": "str",
79    "arg_attribute": {},
80    "resolve_function": "resolve_precise_branch",
81    "testFunction": "testPreciseBranch"
82  },
83  "ccache": {
84    "arg_name": "--ccache",
85    "argDefault": true,
86    "arg_help": "Default:True. Help:Enable ccache, this option could improve compilation speed. --stat-ccache can summary the cache data",
87    "arg_phase": "prebuild",
88    "arg_type": "bool",
89    "arg_attribute": {},
90    "resolve_function": "resolve_ccache",
91    "testFunction": "testCCache"
92  },
93  "xcache": {
94    "arg_name": "--xcache",
95    "argDefault": false,
96    "arg_help": "Default:False. Help:Enable xcache, this option could improve compilation speed. --stat-ccache can summary the cache data",
97    "arg_phase": "prebuild",
98    "arg_type": "bool",
99    "arg_attribute": {},
100    "resolve_function": "resolve_xcache",
101    "testFunction": "testXcache"
102  },
103  "enable_pycache": {
104    "arg_name": "--enable-pycache",
105    "argDefault": false,
106    "arg_help": "Default:False. Help:Enable pycache, This option can improve the execution speed of python files",
107    "arg_phase": "prebuild",
108    "arg_type": "bool",
109    "arg_attribute": {},
110    "resolve_function": "resolve_pycache",
111    "testFunction": "testPycache"
112  },
113  "jobs": {
114    "arg_name": "--jobs",
115    "argDefault": "",
116    "arg_help": "Deprecated, please do not use this option",
117    "arg_phase": "prebuild",
118    "arg_type": "str",
119    "arg_attribute": {
120      "deprecated": "true"
121    },
122    "resolve_function": "resolve_jobs",
123    "testFunction": "testJobs"
124  },
125  "disable_part_of_post_build": {
126    "arg_name": "--disable-part-of-post-build",
127    "argDefault": [],
128    "arg_help": "Deprecated, please do not use this option",
129    "arg_phase": "prebuild",
130    "arg_type": "list",
131    "arg_attribute": {
132      "deprecated": "true"
133    },
134    "resolve_function": "resolve_disable_part_of_post_build",
135    "testFunction": "testDisablePartOfPostBuild"
136  },
137  "build_target": {
138    "arg_name": "--build-target",
139    "argDefault": [],
140    "arg_help": "Default:[]. Help:You use this option to specify a single compilation target, and use 'hb tool --ls' to list all build target",
141    "arg_phase": "prebuild",
142    "arg_type": "list",
143    "arg_attribute": {
144      "abbreviation": "-T"
145    },
146    "resolve_function": "resolve_build_target",
147    "testFunction": "testBuildTarget"
148  },
149  "ninja_args": {
150    "arg_name": "--ninja-args",
151    "argDefault": [],
152    "arg_help": "Default:[]. Help:You can use it to pass parameters for the ninja phase, but you need to follow the specified command format. eg. --ninja-args=-dkeeprsp ",
153    "arg_phase": "prebuild",
154    "arg_type": "list",
155    "arg_attribute": {},
156    "resolve_function": "resolve_ninja_args",
157    "testFunction": "testNinjaArgs"
158  },
159  "full_compilation": {
160    "arg_name": "--full-compilation",
161    "argDefault": false,
162    "arg_help": "Default:[]. Help:You can use it to start full code compilation. The default compilation target is images. Use this option to add 'make_all' and 'make_test' to the build process.",
163    "arg_phase": "prebuild",
164    "arg_type": "bool",
165    "arg_attribute": {
166      "abbreviation": "-f"
167    },
168    "resolve_function": "resolve_full_compilation",
169    "testFunction": "testFullCompilation"
170  },
171  "strict_mode": {
172    "arg_name": "--strict-mode",
173    "argDefault": false,
174    "arg_help": "Default:False. Help:Check all produce of each phase to early terminates a potentially problematic compilation.",
175    "arg_phase": "load",
176    "arg_type": "bool",
177    "arg_attribute": {},
178    "resolve_function": "resolve_strict_mode",
179    "testFunction": "testStrictMode"
180  },
181  "scalable_build": {
182    "arg_name": "--scalable-build",
183    "argDefault": false,
184    "arg_help": "Default:False. Help:Select whether to read information from parts.json generate by preload",
185    "arg_phase": "load",
186    "arg_type": "bool",
187    "arg_attribute": {},
188    "resolve_function": "resolve_scalable_build",
189    "testFunction": "testScalableBuild"
190  },
191  "build_example": {
192    "arg_name": "--build-example",
193    "argDefault": false,
194    "arg_help": "Default:False. Help:Select whether to read information from subsystem_config_example.json",
195    "arg_phase": "load",
196    "arg_type": "bool",
197    "arg_attribute": {},
198    "resolve_function": "resolve_build_example",
199    "testFunction": "testBuildExample"
200  },
201  "build_platform_name": {
202    "arg_name": "--build-platform-name",
203    "argDefault": "phone",
204    "arg_help": "Default:'phone'. Help:Name of the compilation platform. The current optional value is 'phone'",
205    "arg_phase": "load",
206    "arg_type": "str",
207    "arg_attribute": {},
208    "resolve_function": "resolve_build_platform_name",
209    "testFunction": "testBuildPlatformName"
210  },
211  "build_xts": {
212    "arg_name": "--build-xts",
213    "argDefault": false,
214    "arg_help": "Default:False. Help:Select whether to load the components included in the subsystem xts",
215    "arg_phase": "load",
216    "arg_type": "bool",
217    "arg_attribute": {},
218    "resolve_function": "resolve_build_xts",
219    "testFunction": "testBuildXts"
220  },
221  "ignore_api_check": {
222    "arg_name": "--ignore-api-check",
223    "argDefault": [],
224    "arg_help": "Default:[]. Help:Skip the check of some subsystems",
225    "arg_phase": "load",
226    "arg_type": "list",
227    "arg_attribute": {},
228    "resolve_function": "resolve_ignore_api_check",
229    "testFunction": "testIgnoreApiCheck"
230  },
231  "load_test_config": {
232    "arg_name": "--load-test-config",
233    "argDefault": true,
234    "arg_help": "Default:True. Help:Select whether to load the test field in bundle.json, that is, whether to call the test case",
235    "arg_phase": "load",
236    "arg_type": "bool",
237    "arg_attribute": {},
238    "resolve_function": "resolve_load_test_config",
239    "testFunction": "testLoadTestConfig"
240  },
241  "skip_partlist_check": {
242    "arg_name": "--skip-partlist-check",
243    "argDefault": false,
244    "arg_help": "Default:False. Help:Skip the subsystem and component check in partlist file",
245    "arg_phase": "load",
246    "arg_type": "bool",
247    "arg_attribute": {},
248    "resolve_function": "resolve_skip_partlist_check",
249    "testFunction": "testSkipPartlistCheck"
250  },
251  "build_type": {
252    "arg_name": "--build-type",
253    "argDefault": "release",
254    "arg_help": "Default:'release'. Help:Specify compile release or debug version",
255    "arg_phase": "targetGenerate",
256    "arg_type": "str",
257    "arg_attribute": {
258      "optional": [
259        "release",
260        "profile",
261        "debug"
262      ]
263    },
264    "resolve_function": "resolve_build_type",
265    "testFunction": "testBuildType"
266  },
267  "log_level": {
268    "arg_name": "--log-level",
269    "argDefault": "info",
270    "arg_help": "Default:'INFO'. Help:Specify the log level during compilation. you can select two levels: debug, info. In debug mode, it show all command lines while building, including cxx, link, solink, etc.",
271    "arg_phase": "targetGenerate",
272    "arg_type": "str",
273    "arg_attribute": {
274      "optional": [
275        "info",
276        "debug"
277      ]
278    },
279    "resolve_function": "resolve_log_level",
280    "testFunction": "testLogLevel"
281  },
282  "export_para": {
283    "arg_name": "--export-para",
284    "argDefault": [],
285    "arg_help": "Deprecated, please do not use this option",
286    "arg_phase": "targetGenerate",
287    "arg_type": "list",
288    "arg_attribute": {
289      "deprecated": "true"
290    },
291    "resolve_function": "resolve_export_para",
292    "testFunction": "testExportPara"
293  },
294  "test": {
295    "arg_name": "--test",
296    "argDefault": [],
297    "arg_help": "Default:[]. Help:You can use it to choose test type. eg. --test xts",
298    "arg_phase": "targetGenerate",
299    "arg_type": "list",
300    "arg_attribute": {},
301    "resolve_function": "resolve_test",
302    "testFunction": "testTest"
303  },
304  "gn_args": {
305    "arg_name": "--gn-args",
306    "argDefault": [],
307    "arg_help": "Default:[]. Help:Specify gn build arguments, you could use this option like this 'hb build --gn-args is_debug=true'",
308    "arg_phase": "targetGenerate",
309    "arg_type": "list",
310    "arg_attribute": {},
311    "resolve_function": "resolve_gn_args",
312    "testFunction": "testGnArgs"
313  },
314  "gn_flags": {
315    "arg_name": "--gn-flags",
316    "argDefault": [],
317    "arg_help": "Default:[]. Help:Specify gn build arguments, you could use this option like this 'hb build --gn-flags \"--export-compile-commands\"",
318    "arg_phase": "targetGenerate",
319    "arg_type": "list",
320    "arg_attribute": {},
321    "resolve_function": "resolve_gn_flags",
322    "testFunction": "testGnFlags"
323  },
324  "compiler": {
325    "arg_name": "--compiler",
326    "argDefault": "clang",
327    "arg_help": "Deprecated, please do not use this option",
328    "arg_phase": "targetGenerate",
329    "arg_type": "str",
330    "arg_attribute": {
331      "abbreviation": "-c"
332    },
333    "resolve_function": "resolve_compiler",
334    "testFunction": "testCompiler"
335  },
336  "fast_rebuild": {
337    "arg_name": "--fast-rebuild",
338    "argDefault": false,
339    "arg_help": "Default:False. Help:You can use it to skip prepare, preloader, gn_gen steps so we can enable it only when there is no change for gn related script",
340    "arg_phase": "targetGenerate",
341    "arg_type": "bool",
342    "arg_attribute": {},
343    "resolve_function": "resolve_fast_rebuild",
344    "testFunction": "testFastRebuild"
345  },
346  "root_perf_main": {
347    "arg_name": "--root-perf-main",
348    "argDefault": "main",
349    "arg_help": "Default:root. Help:different kinds of root packages",
350    "arg_phase": "targetGenerate",
351    "arg_type": "str",
352    "arg_attribute": {
353        "optional": [
354          "root",
355          "main",
356          "root_main"
357        ]
358      },
359    "resolve_function": "resolve_root_perf_main",
360    "testFunction": "testResolveRootPerfMain"
361  },
362  "runtime_mode": {
363    "arg_name": "--runtime-mode",
364    "argDefault": "release",
365    "arg_help": "Default:release. Help:runtime mode",
366    "arg_phase": "targetGenerate",
367    "arg_type": "str",
368    "arg_attribute": {
369        "optional": [
370          "release",
371          "debug",
372          "profile"
373        ]
374      },
375    "resolve_function": "resolve_runtime_mode",
376    "testFunction": "testResolveRuntimeMode"
377  },
378  "check_compilation_parameters": {
379    "arg_name": "--check-compilation-parameters",
380    "argDefault": false,
381    "arg_help": "Default:false. Help:check compilation parameters",
382    "arg_phase": "postTargetGenerate",
383    "arg_type": "bool",
384    "arg_attribute": {},
385    "resolve_function": "resolve_check_compilation_parameters",
386    "testFunction": "testCheckCompilationParameters"
387  },
388  "keep_ninja_going": {
389    "arg_name": "--keep-ninja-going",
390    "argDefault": false,
391    "arg_help": "Default:False. Help:When you need to debug one specific target, you can use this option to keep ninja going to skip some possible error until 1000000 jobs fail",
392    "arg_phase": "targetCompilation",
393    "arg_type": "bool",
394    "arg_attribute": {},
395    "resolve_function": "resolve_keep_ninja_going",
396    "testFunction": "testKeepNinjaGoing"
397  },
398  "build_only_load": {
399    "arg_name": "--build-only-load",
400    "argDefault": false,
401    "arg_help": "Default:False. Help:Stop build until load phase ends",
402    "arg_phase": "targetCompilation",
403    "arg_type": "bool",
404    "arg_attribute": {},
405    "resolve_function": "resolve_build_only_load",
406    "testFunction": "testBuildOnlyLoad"
407  },
408  "build_only_gn": {
409    "arg_name": "--build-only-gn",
410    "argDefault": false,
411    "arg_help": "Default:False. Help:Stop build until gn phase ends",
412    "arg_phase": "targetCompilation",
413    "arg_type": "bool",
414    "arg_attribute": {},
415    "resolve_function": "resolve_build_only_gn",
416    "testFunction": "testBuildOnlyGn"
417  },
418  "build_variant": {
419    "arg_name": "--build-variant",
420    "argDefault": "root",
421    "arg_help": "Default:'root'. Help:specifies device operating mode",
422    "arg_phase": "postTargetCompilation",
423    "arg_type": "str",
424    "arg_attribute": {
425      "optional": [
426        "user",
427        "root"
428      ]
429    },
430    "resolve_function": "resolve_build_variant",
431    "testFunction": "testBuildVariant"
432  },
433  "device_type": {
434    "arg_name": "--device-type",
435    "argDefault": "default",
436    "arg_help": "Default:'default'. Help:specifies device type",
437    "arg_phase": "postTargetCompilation",
438    "arg_type": "str",
439    "arg_attribute": {},
440    "resolve_function": "resolve_device_type",
441    "testFunction": "testDeviceType"
442  },
443  "disable_package_image": {
444    "arg_name": "--disable-package-image",
445    "argDefault": false,
446    "arg_help": "deprecated, please do not use this option",
447    "arg_phase": "postTargetCompilation",
448    "arg_type": "bool",
449    "arg_attribute": {
450      "deprecated": "true"
451    },
452    "resolve_function": "resolve_disable_package_image",
453    "testFunction": "testDisablePackageImage"
454  },
455  "archive_image": {
456    "arg_name": "--archive-image",
457    "argDefault": false,
458    "arg_help": "Default:False. Help:archive image when build product complete",
459    "arg_phase": "postTargetCompilation",
460    "arg_type": "bool",
461    "arg_attribute": {},
462    "resolve_function": "resolve_archive_image",
463    "testFunction": "testArchiveImage"
464  },
465  "patch": {
466    "arg_name": "--patch",
467    "argDefault": false,
468    "arg_help": "Default:False. Help: Apply patches as per configuration in patch.yml, and handle rollback if needed.",
469    "arg_phase": "prebuild",
470    "arg_type": "bool",
471    "arg_attribute": {},
472    "resolve_function": "resolve_patch",
473    "testFunction": "testPatch"
474  },
475  "rom_size_statistics": {
476    "arg_name": "--rom-size-statistics",
477    "argDefault": false,
478    "arg_help": "Default:False. Help:statistics on the actual rom size for each compiled component",
479    "arg_phase": "postTargetCompilation",
480    "arg_type": "bool",
481    "arg_attribute": {},
482    "resolve_function": "resolve_rom_size_statistics",
483    "testFunction": "testRomSizeStatistics"
484  },
485  "stat_ccache": {
486    "arg_name": "--stat-ccache",
487    "argDefault": true,
488    "arg_help": "Default:True. Help:summary ccache hitrate, and generate ccache.log in ${HOME}/.ccache dir",
489    "arg_phase": "postTargetCompilation",
490    "arg_type": "bool",
491    "arg_attribute": {},
492    "resolve_function": "resolve_stat_ccache",
493    "testFunction": "testStatCCache"
494  },
495  "get_warning_list": {
496    "arg_name": "--get-warning-list",
497    "argDefault": true,
498    "arg_help": "Default:True. Help:You can use it to collect the build warning and generate WarningList.txt in output dir",
499    "arg_phase": "postTargetCompilation",
500    "arg_type": "bool",
501    "arg_attribute": {},
502    "resolve_function": "resolve_get_warning_list",
503    "testFunction": "testGetWarningList"
504  },
505  "generate_ninja_trace": {
506    "arg_name": "--generate-ninja-trace",
507    "argDefault": true,
508    "arg_help": "Default:True. Help:Count the duration of each ninja thread and generate the ninja trace file(build.trace.gz)",
509    "arg_phase": "postTargetCompilation",
510    "arg_type": "bool",
511    "arg_attribute": {},
512    "resolve_function": "resolve_generate_ninja_trace",
513    "testFunction": "testResolveGenerateNinjaTrace"
514  },
515  "compute_overlap_rate": {
516    "arg_name": "--compute-overlap-rate",
517    "argDefault": true,
518    "arg_help": "Default:True. Help:Compute overlap rate during the post build",
519    "arg_phase": "postTargetCompilation",
520    "arg_type": "bool",
521    "arg_attribute": {},
522    "resolve_function": "resolve_compute_overlap_rate",
523    "testFunction": "testComputeOverlapRate"
524  },
525  "clean_args": {
526    "arg_name": "--clean-args",
527    "argDefault": true,
528    "arg_help": "Default:True. Help:clean all args that generated by this compilation while compilation finished",
529    "arg_phase": "postbuild",
530    "arg_type": "bool",
531    "arg_attribute": {},
532    "resolve_function": "resolve_clean_args",
533    "testFunction": "testCleanArgs"
534  },
535  "deps_guard": {
536    "arg_name": "--deps-guard",
537    "argDefault": true,
538    "arg_help": "Default:True. Help:simplify code, remove concise dependency analysis, and speed up rule checking",
539    "arg_phase": "postTargetCompilation",
540    "arg_type": "bool",
541    "arg_attribute": {},
542    "resolve_function": "resolve_deps_guard",
543    "testFunction": "testDepsGuard"
544  }
545}
546