• 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  "ccache": {
74    "arg_name": "--ccache",
75    "argDefault": true,
76    "arg_help": "Default:True. Help:Enable ccache, this option could improve compilation speed. --stat-ccache can summary the cache data",
77    "arg_phase": "prebuild",
78    "arg_type": "bool",
79    "arg_attribute": {},
80    "resolve_function": "resolve_ccache",
81    "testFunction": "testCCache"
82  },
83  "enable_pycache": {
84    "arg_name": "--enable-pycache",
85    "argDefault": false,
86    "arg_help": "Default:False. Help:Enable pycache, This option can improve the execution speed of python files",
87    "arg_phase": "prebuild",
88    "arg_type": "bool",
89    "arg_attribute": {},
90    "resolve_function": "resolve_pycache",
91    "testFunction": "testPycache"
92  },
93  "jobs": {
94    "arg_name": "--jobs",
95    "argDefault": "",
96    "arg_help": "Deprecated, please do not use this option",
97    "arg_phase": "prebuild",
98    "arg_type": "str",
99    "arg_attribute": {
100      "deprecated": "true"
101    },
102    "resolve_function": "resolve_jobs",
103    "testFunction": "testJobs"
104  },
105  "disable_part_of_post_build": {
106    "arg_name": "--disable-part-of-post-build",
107    "argDefault": [],
108    "arg_help": "Deprecated, please do not use this option",
109    "arg_phase": "prebuild",
110    "arg_type": "list",
111    "arg_attribute": {
112      "deprecated": "true"
113    },
114    "resolve_function": "resolve_disable_part_of_post_build",
115    "testFunction": "testDisablePartOfPostBuild"
116  },
117  "build_target": {
118    "arg_name": "--build-target",
119    "argDefault": [],
120    "arg_help": "Default:[]. Help:You use this option to specify a single compilation target, and use 'hb tool --ls' to list all build target",
121    "arg_phase": "prebuild",
122    "arg_type": "list",
123    "arg_attribute": {
124      "abbreviation": "-T"
125    },
126    "resolve_function": "resolve_build_target",
127    "testFunction": "testBuildTarget"
128  },
129  "ninja_args": {
130    "arg_name": "--ninja-args",
131    "argDefault": [],
132    "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 ",
133    "arg_phase": "prebuild",
134    "arg_type": "list",
135    "arg_attribute": {},
136    "resolve_function": "resolve_ninja_args",
137    "testFunction": "testNinjaArgs"
138  },
139  "full_compilation": {
140    "arg_name": "--full-compilation",
141    "argDefault": false,
142    "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.",
143    "arg_phase": "prebuild",
144    "arg_type": "bool",
145    "arg_attribute": {
146      "abbreviation": "-f"
147    },
148    "resolve_function": "resolve_full_compilation",
149    "testFunction": "testFullCompilation"
150  },
151  "strict_mode": {
152    "arg_name": "--strict-mode",
153    "argDefault": false,
154    "arg_help": "Default:False. Help:Check all produce of each phase to early terminates a potentially problematic compilation.",
155    "arg_phase": "load",
156    "arg_type": "bool",
157    "arg_attribute": {},
158    "resolve_function": "resolve_strict_mode",
159    "testFunction": "testStrictMode"
160  },
161  "scalable_build": {
162    "arg_name": "--scalable-build",
163    "argDefault": false,
164    "arg_help": "Default:False. Help:Select whether to read information from parts.json generate by preload",
165    "arg_phase": "load",
166    "arg_type": "bool",
167    "arg_attribute": {},
168    "resolve_function": "resolve_scalable_build",
169    "testFunction": "testScalableBuild"
170  },
171  "build_example": {
172    "arg_name": "--build-example",
173    "argDefault": false,
174    "arg_help": "Default:False. Help:Select whether to read information from subsystem_config_example.json",
175    "arg_phase": "load",
176    "arg_type": "bool",
177    "arg_attribute": {},
178    "resolve_function": "resolve_build_example",
179    "testFunction": "testBuildExample"
180  },
181  "build_platform_name": {
182    "arg_name": "--build-platform-name",
183    "argDefault": "phone",
184    "arg_help": "Default:'phone'. Help:Name of the compilation platform. The current optional value is 'phone'",
185    "arg_phase": "load",
186    "arg_type": "str",
187    "arg_attribute": {},
188    "resolve_function": "resolve_build_platform_name",
189    "testFunction": "testBuildPlatformName"
190  },
191  "build_xts": {
192    "arg_name": "--build-xts",
193    "argDefault": false,
194    "arg_help": "Default:False. Help:Select whether to load the components included in the subsystem xts",
195    "arg_phase": "load",
196    "arg_type": "bool",
197    "arg_attribute": {},
198    "resolve_function": "resolve_build_xts",
199    "testFunction": "testBuildXts"
200  },
201  "ignore_api_check": {
202    "arg_name": "--ignore-api-check",
203    "argDefault": [],
204    "arg_help": "Default:[]. Help:Skip the check of some subsystems",
205    "arg_phase": "load",
206    "arg_type": "list",
207    "arg_attribute": {},
208    "resolve_function": "resolve_ignore_api_check",
209    "testFunction": "testIgnoreApiCheck"
210  },
211  "load_test_config": {
212    "arg_name": "--load-test-config",
213    "argDefault": true,
214    "arg_help": "Default:True. Help:Select whether to load the test field in bundle.json, that is, whether to call the test case",
215    "arg_phase": "load",
216    "arg_type": "bool",
217    "arg_attribute": {},
218    "resolve_function": "resolve_load_test_config",
219    "testFunction": "testLoadTestConfig"
220  },
221  "skip_partlist_check": {
222    "arg_name": "--skip-partlist-check",
223    "argDefault": false,
224    "arg_help": "Default:False. Help:Skip the subsystem and component check in partlist file",
225    "arg_phase": "load",
226    "arg_type": "bool",
227    "arg_attribute": {},
228    "resolve_function": "resolve_skip_partlist_check",
229    "testFunction": "testSkipPartlistCheck"
230  },
231  "build_type": {
232    "arg_name": "--build-type",
233    "argDefault": "release",
234    "arg_help": "Default:'release'. Help:Specify compile release or debug version",
235    "arg_phase": "targetGenerate",
236    "arg_type": "str",
237    "arg_attribute": {
238      "optional": [
239        "release",
240        "profile",
241        "debug"
242      ]
243    },
244    "resolve_function": "resolve_build_type",
245    "testFunction": "testBuildType"
246  },
247  "log_level": {
248    "arg_name": "--log-level",
249    "argDefault": "info",
250    "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.",
251    "arg_phase": "targetGenerate",
252    "arg_type": "str",
253    "arg_attribute": {
254      "optional": [
255        "info",
256        "debug"
257      ]
258    },
259    "resolve_function": "resolve_log_level",
260    "testFunction": "testLogLevel"
261  },
262  "export_para": {
263    "arg_name": "--export-para",
264    "argDefault": [],
265    "arg_help": "Deprecated, please do not use this option",
266    "arg_phase": "targetGenerate",
267    "arg_type": "list",
268    "arg_attribute": {
269      "deprecated": "true"
270    },
271    "resolve_function": "resolve_export_para",
272    "testFunction": "testExportPara"
273  },
274  "test": {
275    "arg_name": "--test",
276    "argDefault": [],
277    "arg_help": "Default:[]. Help:You can use it to choose test type. eg. --test xts",
278    "arg_phase": "targetGenerate",
279    "arg_type": "list",
280    "arg_attribute": {},
281    "resolve_function": "resolve_test",
282    "testFunction": "testTest"
283  },
284  "gn_args": {
285    "arg_name": "--gn-args",
286    "argDefault": [],
287    "arg_help": "Default:[]. Help:Specify gn build arguments, you could use this option like this 'hb build --gn-args is_debug=true'",
288    "arg_phase": "targetGenerate",
289    "arg_type": "list",
290    "arg_attribute": {},
291    "resolve_function": "resolve_gn_args",
292    "testFunction": "testGnArgs"
293  },
294  "gn_flags": {
295    "arg_name": "--gn-flags",
296    "argDefault": [],
297    "arg_help": "Default:[]. Help:Specify gn build arguments, you could use this option like this 'hb build --gn-flags \"--export-compile-commands\"",
298    "arg_phase": "targetGenerate",
299    "arg_type": "list",
300    "arg_attribute": {},
301    "resolve_function": "resolve_gn_flags",
302    "testFunction": "testGnFlags"
303  },
304  "compiler": {
305    "arg_name": "--compiler",
306    "argDefault": "clang",
307    "arg_help": "Deprecated, please do not use this option",
308    "arg_phase": "targetGenerate",
309    "arg_type": "str",
310    "arg_attribute": {
311      "abbreviation": "-c"
312    },
313    "resolve_function": "resolve_compiler",
314    "testFunction": "testCompiler"
315  },
316  "fast_rebuild": {
317    "arg_name": "--fast-rebuild",
318    "argDefault": false,
319    "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",
320    "arg_phase": "targetGenerate",
321    "arg_type": "bool",
322    "arg_attribute": {},
323    "resolve_function": "resolve_fast_rebuild",
324    "testFunction": "testFastRebuild"
325  },
326  "root_perf_main": {
327    "arg_name": "--root-perf-main",
328    "argDefault": "main",
329    "arg_help": "Default:root. Help:different kinds of root packages",
330    "arg_phase": "targetGenerate",
331    "arg_type": "str",
332    "arg_attribute": {
333        "optional": [
334          "root",
335          "main",
336          "root_main"
337        ]
338      },
339    "resolve_function": "resolve_root_perf_main",
340    "testFunction": "testResolveRootPerfMain"
341  },
342  "runtime_mode": {
343    "arg_name": "--runtime-mode",
344    "argDefault": "release",
345    "arg_help": "Default:release. Help:runtime mode",
346    "arg_phase": "targetGenerate",
347    "arg_type": "str",
348    "arg_attribute": {
349        "optional": [
350          "release",
351          "debug",
352          "profile"
353        ]
354      },
355    "resolve_function": "resolve_runtime_mode",
356    "testFunction": "testResolveRuntimeMode"
357  },
358  "check_compilation_parameters": {
359    "arg_name": "--check-compilation-parameters",
360    "argDefault": false,
361    "arg_help": "Default:false. Help:check compilation parameters",
362    "arg_phase": "postTargetGenerate",
363    "arg_type": "bool",
364    "arg_attribute": {},
365    "resolve_function": "resolve_check_compilation_parameters",
366    "testFunction": "testCheckCompilationParameters"
367  },
368  "keep_ninja_going": {
369    "arg_name": "--keep-ninja-going",
370    "argDefault": false,
371    "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",
372    "arg_phase": "targetCompilation",
373    "arg_type": "bool",
374    "arg_attribute": {},
375    "resolve_function": "resolve_keep_ninja_going",
376    "testFunction": "testKeepNinjaGoing"
377  },
378  "build_only_load": {
379    "arg_name": "--build-only-load",
380    "argDefault": false,
381    "arg_help": "Default:False. Help:Stop build until load phase ends",
382    "arg_phase": "targetCompilation",
383    "arg_type": "bool",
384    "arg_attribute": {},
385    "resolve_function": "resolve_build_only_load",
386    "testFunction": "testBuildOnlyLoad"
387  },
388  "build_only_gn": {
389    "arg_name": "--build-only-gn",
390    "argDefault": false,
391    "arg_help": "Default:False. Help:Stop build until gn phase ends",
392    "arg_phase": "targetCompilation",
393    "arg_type": "bool",
394    "arg_attribute": {},
395    "resolve_function": "resolve_build_only_gn",
396    "testFunction": "testBuildOnlyGn"
397  },
398  "build_variant": {
399    "arg_name": "--build-variant",
400    "argDefault": "root",
401    "arg_help": "Default:'root'. Help:specifies device operating mode",
402    "arg_phase": "postTargetCompilation",
403    "arg_type": "str",
404    "arg_attribute": {
405      "optional": [
406        "user",
407        "root"
408      ]
409    },
410    "resolve_function": "resolve_build_variant",
411    "testFunction": "testBuildVariant"
412  },
413  "device_type": {
414    "arg_name": "--device-type",
415    "argDefault": "default",
416    "arg_help": "Default:'default'. Help:specifies device type",
417    "arg_phase": "postTargetCompilation",
418    "arg_type": "str",
419    "arg_attribute": {},
420    "resolve_function": "resolve_device_type",
421    "testFunction": "testDeviceType"
422  },
423  "disable_package_image": {
424    "arg_name": "--disable-package-image",
425    "argDefault": false,
426    "arg_help": "deprecated, please do not use this option",
427    "arg_phase": "postTargetCompilation",
428    "arg_type": "bool",
429    "arg_attribute": {
430      "deprecated": "true"
431    },
432    "resolve_function": "resolve_disable_package_image",
433    "testFunction": "testDisablePackageImage"
434  },
435  "archive_image": {
436    "arg_name": "--archive-image",
437    "argDefault": false,
438    "arg_help": "Default:False. Help:archive image when build product complete",
439    "arg_phase": "postTargetCompilation",
440    "arg_type": "bool",
441    "arg_attribute": {},
442    "resolve_function": "resolve_archive_image",
443    "testFunction": "testArchiveImage"
444  },
445  "patch": {
446    "arg_name": "--patch",
447    "argDefault": false,
448    "arg_help": "Default:False. Help: Apply patches as per configuration in patch.yml, and handle rollback if needed.",
449    "arg_phase": "prebuild",
450    "arg_type": "bool",
451    "arg_attribute": {},
452    "resolve_function": "resolve_patch",
453    "testFunction": "testPatch"
454  },
455  "rom_size_statistics": {
456    "arg_name": "--rom-size-statistics",
457    "argDefault": false,
458    "arg_help": "Default:False. Help:statistics on the actual rom size for each compiled component",
459    "arg_phase": "postTargetCompilation",
460    "arg_type": "bool",
461    "arg_attribute": {},
462    "resolve_function": "resolve_rom_size_statistics",
463    "testFunction": "testRomSizeStatistics"
464  },
465  "stat_ccache": {
466    "arg_name": "--stat-ccache",
467    "argDefault": true,
468    "arg_help": "Default:True. Help:summary ccache hitrate, and generate ccache.log in ${HOME}/.ccache dir",
469    "arg_phase": "postTargetCompilation",
470    "arg_type": "bool",
471    "arg_attribute": {},
472    "resolve_function": "resolve_stat_ccache",
473    "testFunction": "testStatCCache"
474  },
475  "get_warning_list": {
476    "arg_name": "--get-warning-list",
477    "argDefault": true,
478    "arg_help": "Default:True. Help:You can use it to collect the build warning and generate WarningList.txt in output dir",
479    "arg_phase": "postTargetCompilation",
480    "arg_type": "bool",
481    "arg_attribute": {},
482    "resolve_function": "resolve_get_warning_list",
483    "testFunction": "testGetWarningList"
484  },
485  "generate_ninja_trace": {
486    "arg_name": "--generate-ninja-trace",
487    "argDefault": true,
488    "arg_help": "Default:True. Help:Count the duration of each ninja thread and generate the ninja trace file(build.trace.gz)",
489    "arg_phase": "postTargetCompilation",
490    "arg_type": "bool",
491    "arg_attribute": {},
492    "resolve_function": "resolve_generate_ninja_trace",
493    "testFunction": "testResolveGenerateNinjaTrace"
494  },
495  "compute_overlap_rate": {
496    "arg_name": "--compute-overlap-rate",
497    "argDefault": true,
498    "arg_help": "Default:True. Help:Compute overlap rate during the post build",
499    "arg_phase": "postTargetCompilation",
500    "arg_type": "bool",
501    "arg_attribute": {},
502    "resolve_function": "resolve_compute_overlap_rate",
503    "testFunction": "testComputeOverlapRate"
504  },
505  "clean_args": {
506    "arg_name": "--clean-args",
507    "argDefault": true,
508    "arg_help": "Default:True. Help:clean all args that generated by this compilation while compilation finished",
509    "arg_phase": "postbuild",
510    "arg_type": "bool",
511    "arg_attribute": {},
512    "resolve_function": "resolve_clean_args",
513    "testFunction": "testCleanArgs"
514  },
515  "deps_guard": {
516    "arg_name": "--deps-guard",
517    "argDefault": true,
518    "arg_help": "Default:True. Help:simplify code, remove concise dependency analysis, and speed up rule checking",
519    "arg_phase": "postTargetCompilation",
520    "arg_type": "bool",
521    "arg_attribute": {},
522    "resolve_function": "resolve_deps_guard",
523    "testFunction": "testDepsGuard"
524  }
525}
526