• 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  "keep_ninja_going": {
310    "arg_name": "--keep-ninja-going",
311    "argDefault": false,
312    "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",
313    "arg_phase": "targetCompilation",
314    "arg_type": "bool",
315    "arg_attribute": {},
316    "resolve_function": "resolve_keep_ninja_going",
317    "testFunction": "testKeepNinjaGoing"
318  },
319  "build_only_gn": {
320    "arg_name": "--build-only-gn",
321    "argDefault": false,
322    "arg_help": "Default:False. Help:Stop build until gn phase ends",
323    "arg_phase": "targetCompilation",
324    "arg_type": "bool",
325    "arg_attribute": {},
326    "resolve_function": "resolve_build_only_gn",
327    "testFunction": "testBuildOnlyGn"
328  },
329  "build_variant": {
330    "arg_name": "--build-variant",
331    "argDefault": "root",
332    "arg_help": "Default:'root'. Help:specifies device operating mode",
333    "arg_phase": "postTargetCompilation",
334    "arg_type": "str",
335    "arg_attribute": {
336      "optional": [
337        "user",
338        "root"
339      ]
340    },
341    "resolve_function": "resolve_build_variant",
342    "testFunction": "testBuildVariant"
343  },
344  "device_type": {
345    "arg_name": "--device-type",
346    "argDefault": "default",
347    "arg_help": "Default:'default'. Help:specifies device type",
348    "arg_phase": "postTargetCompilation",
349    "arg_type": "str",
350    "arg_attribute": {},
351    "resolve_function": "resolve_device_type",
352    "testFunction": "testDeviceType"
353  },
354  "disable_package_image": {
355    "arg_name": "--disable-package-image",
356    "argDefault": false,
357    "arg_help": "deprecated, please do not use this option",
358    "arg_phase": "postTargetCompilation",
359    "arg_type": "bool",
360    "arg_attribute": {
361      "deprecated": "true"
362    },
363    "resolve_function": "resolve_disable_package_image",
364    "testFunction": "testDisablePackageImage"
365  },
366  "archive_image": {
367    "arg_name": "--archive-image",
368    "argDefault": false,
369    "arg_help": "Default:False. Help:archive image when build product complete",
370    "arg_phase": "postTargetCompilation",
371    "arg_type": "bool",
372    "arg_attribute": {},
373    "resolve_function": "resolve_archive_image",
374    "testFunction": "testArchiveImage"
375  },
376  "rom_size_statistics": {
377    "arg_name": "--rom-size-statistics",
378    "argDefault": false,
379    "arg_help": "Default:False. Help:statistics on the actual rom size for each compiled component",
380    "arg_phase": "postTargetCompilation",
381    "arg_type": "bool",
382    "arg_attribute": {},
383    "resolve_function": "resolve_rom_size_statistics",
384    "testFunction": "testRomSizeStatistics"
385  },
386  "stat_ccache": {
387    "arg_name": "--stat-ccache",
388    "argDefault": true,
389    "arg_help": "Default:True. Help:summary ccache hitrate, and generate ccache.log in ${HOME}/.ccache dir",
390    "arg_phase": "postTargetCompilation",
391    "arg_type": "bool",
392    "arg_attribute": {},
393    "resolve_function": "resolve_stat_ccache",
394    "testFunction": "testStatCCache"
395  },
396  "get_warning_list": {
397    "arg_name": "--get-warning-list",
398    "argDefault": true,
399    "arg_help": "Default:True. Help:You can use it to collect the build warning and generate WarningList.txt in output dir",
400    "arg_phase": "postTargetCompilation",
401    "arg_type": "bool",
402    "arg_attribute": {},
403    "resolve_function": "resolve_get_warning_list",
404    "testFunction": "testGetWarningList"
405  },
406  "generate_ninja_trace": {
407    "arg_name": "--generate-ninja-trace",
408    "argDefault": true,
409    "arg_help": "Default:True. Help:Count the duration of each ninja thread and generate the ninja trace file(build.trace.gz)",
410    "arg_phase": "postTargetCompilation",
411    "arg_type": "bool",
412    "arg_attribute": {},
413    "resolve_function": "resolve_generate_ninja_trace",
414    "testFunction": "testResolveGenerateNinjaTrace"
415  },
416  "compute_overlap_rate": {
417    "arg_name": "--compute-overlap-rate",
418    "argDefault": true,
419    "arg_help": "Default:True. Help:Compute overlap rate during the post build",
420    "arg_phase": "postTargetCompilation",
421    "arg_type": "bool",
422    "arg_attribute": {},
423    "resolve_function": "resolve_compute_overlap_rate",
424    "testFunction": "testComputeOverlapRate"
425  },
426  "clean_args": {
427    "arg_name": "--clean-args",
428    "argDefault": true,
429    "arg_help": "Default:True. Help:clean all args that generated by this compilation while compilation finished",
430    "arg_phase": "postbuild",
431    "arg_type": "bool",
432    "arg_attribute": {},
433    "resolve_function": "resolve_clean_args",
434    "testFunction": "testCleanArgs"
435  },
436  "deps_guard": {
437    "arg_name": "--deps-guard",
438    "argDefault": true,
439    "arg_help": "Default:True. Help:simplify code, remove concise dependency analysis, and speed up rule checking",
440    "arg_phase": "postTargetCompilation",
441    "arg_type": "bool",
442    "arg_attribute": {},
443    "resolve_function": "resolve_deps_guard",
444    "testFunction": "testDepsGuard"
445  }
446}
447