on_build_file/on_build_files中参数opt的origin方法为nil #2534
Answered
by
waruqi
augustheart
asked this question in
Q&A
-
本地xmake版本为xmake v2.6.8+master.39aba1bad target("utilities4")
set_kind("shared")
set_targetdir("bin")
set_prefixname("")
add_files("utilities/utilities.rc","utilities/src/**.cpp")
add_includedirs("utilities/include","config","utilities")
add_links("gdi32")
on_build_file(function (target, sourcefile, opt)
opt.origin(target,sourcefile,opt)
end)
target_end() 结果是报错: error: ...mdir\core\sandbox\modules\import\core\base\scheduler.lua:56: field 'origin' is not callable (a nil value) 有一个issue提到了这个错误。看issue日志这是18年出来的功能,也没注意到后续的changelog有修改,在线文档也是有这个写法。感觉不应该是bug,求提示 |
Beta Was this translation helpful? Give feedback.
Answered by
waruqi
Jul 5, 2022
Replies: 1 comment
-
opt.origin 这是早期遗留设计,应该已经不存在了,文档部分有些可能没更新。。你可以在 before_build_file/after_build_file 里面操作 |
Beta Was this translation helpful? Give feedback.
0 replies
Answer selected by
augustheart
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
opt.origin 这是早期遗留设计,应该已经不存在了,文档部分有些可能没更新。。你可以在 before_build_file/after_build_file 里面操作