OpenHarmony开发者论坛

标题: outdir = rebase_path("$root_out_dir") 中的root_out_dir 环境变量是哪里设置的? [打印本页]

作者: xuxiyang    时间: 2024-3-27 14:18
标题: outdir = rebase_path("$root_out_dir") 中的root_out_dir 环境变量是哪里设置的?
【问题描述】
问题现象和发生的背景
outdir = rebase_path("$root_out_dir") 中的root_out_dir 环境变量是哪里设置的?


相关的代码,截图,日志信息


我尝试过的解决方法和结果


我想要达到的结果


【运行环境】
硬件:
ROM版本:
DevEvoStudio版本:
SDK版本:

作者: 深开鸿_李涛    时间: 2024-3-28 10:17
这个应该是gn内置的变量:

  1. ❯ ../prebuilts/build-tools/linux-x86/bin/gn help root_out_dir
  2. root_out_dir: [string] Root directory for toolchain output files.

  3.   Absolute path to the root of the output directory tree for the current
  4.   toolchain. It will not have a trailing slash.

  5.   For the default toolchain this will be the same as the root_build_dir. An
  6.   example would be "//out/Debug" for the default toolchain, or
  7.   "//out/Debug/arm" for the "arm" toolchain.

  8.   This is primarily useful for setting up script calls. If you are passing this
  9.   to a script, you will want to pass it through rebase_path() (see "gn help
  10.   rebase_path") to convert it to be relative to the build directory.

  11.   See also "target_out_dir" which is usually a better location for output
  12.   files. It will be inside the root output dir.

  13. Example

  14.   action("myscript") {
  15.     # Pass the output dir to the script.
  16.     args = [ "-o", rebase_path(root_out_dir, root_build_dir) ]
  17.   }
复制代码

作者: xuxiyang    时间: 2024-3-28 15:51
回复 深开鸿_李涛: 很有用十分感谢,命令也实用




欢迎光临 OpenHarmony开发者论坛 (https://forums.openharmony.cn/) Powered by Discuz! X3.5