xmake p参数前面2次plat获取值为空 #4189
Replies: 3 comments
-
Title: xmake The value obtained by plat for the first two times of the p parameter is empty. Xmake versionxmake v2.8.2+20230909 Operating system version and architectureLinux evil 6.2.0-32-generic #32~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 18 10:40:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux Describe the problemAfter running with parameter p, plat obtains nil for the first two times from get_config. evil@evil:~/dev/test-xmake/hello$ xmake f -p linux -v
plat=>nil
plat=>nil
plat=>linux
plat=>linux
configure
{
plat=linux
ndk_stdcxx = true
buildir = build
mode=release
arch = x86_64
kind = static
clean = true
host=linux
ccache = true
}
### Expected results
The first two of plat should not be empty nil, they should be like the following:
plat=>linux
plat=>linux
plat=>linux
plat=>linux
### Project configuration
xmake.lua
```lua
print('plat=>',get_config('plat'))
add_rules("mode.debug", "mode.release")
target("hello")
set_kind("binary")
add_files("src/*.cpp") Additional information and error logsevil@evil:~/dev/test-xmake/hello$ xmake f -p linux -vD
plat=>nil
plat=>nil
plat=>linux
plat=>linux
configure
{
mode=release
buildir = build
plat=linux
ndk_stdcxx = true
clean=true
kind = static
arch = x86_64
host=linux
ccache = true
}
```bash
|
Beta Was this translation helpful? Give feedback.
-
前两次是有可能会空,最开始两次仅仅是在解析 rule / option 等域,即使为 nil,那个阶段还无法获取到 option config, 对后期 target 的配置行为,也不会产生影响,不影响整体配置编译,正常行为,不用去纠结这个。。如果觉得配置后的构建行为不对,直接提供编译错误以及应该正确构建的流程。 你要想调试各种配置状态,应该在脚本域中去 print |
Beta Was this translation helpful? Give feedback.
-
The first two times may be empty. The first two times are only parsing the rule / option and other fields. Even if it is nil, it will not have an impact on the later target configuration behavior, but it will not affect the overall configuration compilation and normal behavior. . If you feel that the configured build behavior is wrong, directly provide the compilation error and the process that should be built correctly. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
-
Xmake 版本
xmake v2.8.2+20230909
操作系统版本和架构
Linux evil 6.2.0-32-generic #32~22.04.1-Ubuntu SMP PREEMPT_DYNAMIC Fri Aug 18 10:40:13 UTC 2 x86_64 x86_64 x86_64 GNU/Linux
描述问题
带参数p 运行后,plat从get_config 中获取前面2次为nil
附加信息和错误日志
Beta Was this translation helpful? Give feedback.
All reactions