-
-
Notifications
You must be signed in to change notification settings - Fork 917
Closed
Labels
Milestone
Description
你在什么场景下需要该功能?
考虑这样一个混链场景:
target("Zig-CGPUMandelbrot")
set_group("04.examples/cgpu")
set_kind("binary")
add_rules("utils.dxc", {
spv_outdir = "/../resources/shaders/cgpu-mandelbrot",
dxil_outdir = "/../resources/shaders/cgpu-mandelbrot"})
add_deps("SkrRT")
add_files("cgpu-mandelbrot/**.hlsl")
set_toolchains("@zig")
add_files("cgpu-mandelbrot/lodepng.c")
add_files("cgpu-mandelbrot/mandelbrot.zig")- SkrRT 是一个 C/C++ 目标,使用 MSVC/Clang-Cl/LLVM 等标准 C++ 工具链,也有一些 public 的 flags;
- 在这个 Zig 目标中,也有一些 C/C++ 文件 (lodepng.c);
在这种情境下,现在的 zig toolchain 会默认使用 zig cc 构建这个 C 文件,并接受 SkrRT 传递来的 cxflags。但是 zig cc 有可能不认识这些标志,就会导致构建失败。
描述可能的解决方案
提供一种混合 toolchain 的方法,可以针对 C/C++ 文件使用默认 C/C++ 工具链,只对 Zig 文件单独使用 Zig 编译器。
描述你认为的候选方案
No response
其他信息
No response
Reactions are currently unavailable