From f9a907772f506ca7e2d84e96d4d17cffc7dae50f Mon Sep 17 00:00:00 2001 From: Caoruihong Date: Thu, 2 Sep 2021 10:54:15 +0800 Subject: [PATCH] feat(build): make liteos_config_file available as gn argument You can specify another config file in hb build like this: hb build --gn-args liteos_config_file=myconfig.config file specified in liteos_config_file argument is relative to "$product_path/kernel_configs" directory, or is an absolute file path, for example: hb build --gn-args liteos_config_file=//path/to/myconfig.config or hb build --gn-args liteos_config_file=/another/path/to/myconfig.config Signed-off-by: Caoruihong Change-Id: I7e98604006feff9c2487e06a8f3f2a11e5de746b --- BUILD.gn | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/BUILD.gn b/BUILD.gn index 07e7fc3f..073d508e 100644 --- a/BUILD.gn +++ b/BUILD.gn @@ -45,7 +45,11 @@ if (tee_enable) { tee = "_tee" } -liteos_config_file = "$product_path/kernel_configs/${ohos_build_type}${tee}.config" +declare_args() { + liteos_config_file = "${ohos_build_type}${tee}.config" +} + +liteos_config_file = rebase_path(liteos_config_file, "", "$product_path/kernel_configs") print("liteos_config_file:", liteos_config_file) exec_script("//build/lite/run_shell_cmd.py",