自定义工具链不生效 #2943
Unanswered
HelloWorld886
asked this question in
Q&A
自定义工具链不生效
#2943
Replies: 3 comments
-
要顶层写明 |
Beta Was this translation helpful? Give feedback.
0 replies
-
感觉这样不是很方便,明明libnx里已经依赖过devkit-a64了,这就不需要重复add了。 |
Beta Was this translation helpful? Give feedback.
0 replies
-
不能,那是 libnx 内部依赖,对外不可见。隐式的使用,只会更加晦涩难懂,不易维护。。 目前你只能直接外面配。 |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Xmake 版本
2.7.2
操作系统版本和架构
Windows 10
描述问题
自定义工具链不生效。libnx包依赖了devkit-a64包,set_toolchains不生效。如果是add_requires("devkit-a64","libnx"),这样是可以的。
期待的结果
add_requires("libnx")也能使用自定义工具链
工程配置
add_rules("mode.debug", "mode.release")
set_xmakever("2.7.2")
set_plat("cross")
--自定义工具链
toolchain("aarch64-none-elf")
set_kind("cross")
on_load(function (toolchain)
toolchain:load_cross_toolchain()
end)
toolchain_end()
add_repositories("xswitch-repo https://github.com/HelloEngine/xswitch-repo.git main")
add_requires("libnx")
target("application")
set_toolchains("aarch64-none-elf@devkit-a64")
add_packages("libnx")
add_rules("@libnx/switch")
set_kind("binary")
add_files("source/main.c")
附加信息和错误日志
checkinfo: cannot runv(unzip.exe -v), No such file or directory
checking for unzip ... no
checking for 7z ... F:\HelloEngine\Tools\xmake\winenv\bin\7z
checking for git ... ok
checkinfo: cannot runv(gzip.exe --version), No such file or directory
checking for gzip ... no
git rev-parse HEAD
checking for mingw directory ... D:\msys64\mingw64
finding bin2s from xmake ..
checking for xmake::bin2s ... bin2s master
finding devkit-a64 from xmake ..
checking for xmake::devkit-a64 ... devkit-a64 1.0.0
finding switch-tools from xmake ..
checking for xmake::switch-tools ... switch-tools 1.0.0
finding libnx from xmake ..
checking for xmake::libnx ... libnx master
checking for gcc ... ok
checking for the c compiler (cc) ... gcc
checking for gcc ... ok
checking for flags (-fPIC) ... ok
stack traceback:
[C]: in function 'error'
@programdir\core\base\os.lua:897: in function 'base/os.raiselevel'
(...tail calls...)
@programdir\modules\private\async\runjobs.lua:256: in field 'catch'
@programdir\core\sandbox\modules\try.lua:123: in global 'try'
@programdir\modules\private\async\runjobs.lua:218: in upvalue 'cotask'
@programdir\core\base\scheduler.lua:388: in function <@programdir\core\base\scheduler.lua:385>
Beta Was this translation helpful? Give feedback.
All reactions