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