Closed Dozingfiretruck closed 7 months ago
Bot detected the issue body's language is not English, translate it automatically.
Title: xmake f -c -P . Clear configuration error
2.8.8
win10
The project can be compiled normally, but xmake f -c -P . clears the configuration and reports an error
Clear normally
xmake.lua: project_dir = os.scriptdir() csdk_root = "../../" includes(csdk_root)
xmake.lua under csdk_root: -- Various common configurations includes("bootloader") includes("project") includes("bootloader")
xmake.lua under bootloader
target("driver",function() set_kind("static") set_targetdir(project_dir.."/build/bootloader_libdriver")
-- Various common configurations
end)
Among them, the project_dir in set_targetdir(project_dir.."/build/bootloader_libdriver") will report an error. The global variable description field should be used normally, and the compilation is normal. Only xmake f -c -P . error is reported.
给下完整工程,好歹 code 贴贴好么,这么乱 怎么看
Bot detected the issue body's language is not English, translate it automatically.
Could you please post the complete project? Can you please post the code? It’s so messy. What do you think?
给下完整工程,好歹 code 贴贴好么,这么乱 怎么看
已修改
Bot detected the issue body's language is not English, translate it automatically.
Can you please post the complete project and post the code? It’s so messy. What do you think?
already edited
无法复现
add_rules("mode.debug", "mode.release")
foo=os.scriptdir()
target("foo")
set_kind("static")
add_files("src/foo.cpp")
includes("src")
src/xmake.lua
includes("bar")
src/bar/xmake.lua
target("test8", function ()
set_kind("binary")
add_deps("foo")
add_files("src/main.cpp")
print(foo)
end)
ruki-2:test8 ruki$ xmake
/private/tmp/test8
/private/tmp/test8
给个完整可复现的最小 example
Bot detected the issue body's language is not English, translate it automatically.
Give a complete and reproducible minimal example
给个完整可复现的最小 example
仓库: https://gitee.com/openLuat/luatos-soc-2024
在 luatos-soc-2024\project\test 目录下执行 xmake -P . 可正常编译 执行 xmake f -c -P . 清除会报错
Bot detected the issue body's language is not English, translate it automatically.
Give a complete and reproducible minimal example
Warehouse: https://gitee.com/openLuat/luatos-soc-2024
Execute xmake -P in the luatos-soc-2024\project\test directory. It can be compiled normally. Execute xmake f -c -P. Clearing will report an error
再试试,xmake update -s dev
Bot detected the issue body's language is not English, translate it automatically.
Try again,
xmake update -s dev
给个完整可复现的最小 example
仓库: https://gitee.com/openLuat/luatos-soc-2024
在 luatos-soc-2024\project\test 目录下执行 xmake -P . 可正常编译 执行 xmake f -c -P . 清除会报错
xmake update -s dev
可以了
Bot detected the issue body's language is not English, translate it automatically.
Give a complete and reproducible minimal example
Warehouse: https://gitee.com/openLuat/luatos-soc-2024
Execute xmake -P in the luatos-soc-2024\project\test directory. It can be compiled normally. Execute xmake f -c -P. An error will be reported after clearing
xmake update -s dev
That's it
Xmake 版本
2.8.8
操作系统版本和架构
win10
描述问题
工程能正常编译,但是xmake f -c -P . 清除配置报错
期待的结果
正常清除
工程配置
xmake.lua :
csdk_root下xmake.lua:
bootloader下 xmake.lua
其中 ‘set_targetdir(project_dir.."/build/bootloader_libdriver")’ 中的 project_dir就会报错,全局变量描述域应该正常使用的,而且编译是正常的,只有 xmake f -c -P . 报错
附加信息和错误日志