-
-
Notifications
You must be signed in to change notification settings - Fork 764
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
更好的 zig & C/C++ 混合构建支持 #3251
Labels
Milestone
Comments
看了下,只有显式设置 toolchain 为 zig 才会用 zig cc 。。你把 set_toolchains 去掉,让 xmake 自动根据 .c/.zig 自动去找,就行了。。原本支持
|
|
目前不行,必须得绑定个 toolchain |
OK,那我把 zig 集成到工程 SDK 里面好了,应该就没问题了 |
更新到 dev 再试下 add_rules("mode.debug", "mode.release")
add_requires("zig >=0.10")
target("demo")
set_kind("binary")
add_files("src/*.c")
add_files("src/*.zig")
set_toolchains("@zig", {zigcc = false}) |
OK 了 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
你在什么场景下需要该功能?
考虑这样一个混链场景:
在这种情境下,现在的 zig toolchain 会默认使用 zig cc 构建这个 C 文件,并接受 SkrRT 传递来的 cxflags。但是 zig cc 有可能不认识这些标志,就会导致构建失败。
描述可能的解决方案
提供一种混合 toolchain 的方法,可以针对 C/C++ 文件使用默认 C/C++ 工具链,只对 Zig 文件单独使用 Zig 编译器。
描述你认为的候选方案
No response
其他信息
No response
The text was updated successfully, but these errors were encountered: