all: goal: zero C++/LLVM compilation builds by default #1100

Open
opened 2023-11-04 23:22:56 +00:00 by emidoots · 0 comments
emidoots commented 2023-11-04 23:22:56 +00:00 (Migrated from github.com)

Zig will have it's own x86 compilation backend (already nearly complete), and its own C compilation backend using Aro, for debug builds instead of using LLVM/Clang which will become separate packages available through the build system:

It is suspected that both will allow for blazingly fast incremental compilation & linking ultimately, but C++ code and ObjC/ObjC++ will be odd-ones-out in this picture.

Mach already compiles very little C++ code out of the box, but we could make this literally zero by default. We would then benefit from not requiring LLVM/clang/a C++ compiler for debug builds at all, and benefit from better compilation speeds out-of-the-box.

We have the following C++ code compiled using Zig as the C++/ObjC compiler today:

We can achieve this by ensuring that the above dependencies are either eliminated, or are using a prebuilt static library with a C ABI - like we do for Dawn today. The binaries may still be built using Zig, and there should still be a very clear path to building 100% from source if we go that route. This issue is just describing the 'out of the box Debug build' experience.

Zig will have it's own x86 compilation backend (already nearly complete), and its own C compilation backend using Aro, for debug builds instead of using LLVM/Clang which will become separate packages available through the build system: * https://github.com/ziglang/zig/issues/16269 * https://github.com/ziglang/zig/issues/16270 It is suspected that both will allow for blazingly fast incremental compilation & linking ultimately, but C++ code and ObjC/ObjC++ will be odd-ones-out in this picture. Mach already _compiles_ very little C++ code out of the box, but we could make this literally zero by default. We would then benefit from not requiring LLVM/clang/a C++ compiler for debug builds at all, and benefit from better compilation speeds out-of-the-box. We have the following C++ code _compiled using Zig as the C++/ObjC compiler_ today: * C++ * [ ] [hexops/mach-gpu-dawn](https://github.com/hexops/mach-gpu-dawn) MinGW COM shims https://github.com/hexops/mach-gpu-dawn/blob/main/src/dawn/mingw_helpers.cpp * [ ] [hexops/mach-gpu](https://github.com/hexops/mach-gpu) Dawn C++ API shim https://github.com/hexops/mach-gpu/blob/main/src/mach_dawn.cpp * [ ] [hexops/basisu](https://github.com/hexops/basisu) C++ library * [ ] [hexops/harfbuzz](https://github.com/hexops/harfbuzz) C++ library * [ ] [hexops/mach-basisu](https://github.com/hexops/mach-basisu) [transcoder](https://github.com/hexops/mach-basisu/blob/main/src/transcoder/wrapper.cpp) and [encoder](https://github.com/hexops/mach-basisu/blob/main/src/encoder/wrapper.cpp) C++ API shims * [ ] [hexops/mach-dxcompiler](https://github.com/hexops/mach-dxcompiler), used only for the new sysgpu graphics backend. * [ ] [hexops/spirv-cross](https://github.com/hexops/spirv-cross), used only for the new sysgpu graphics backend. * [ ] [hexops/spirv-tools](https://github.com/hexops/spirv-tools), used only for the new sysgpu graphics backend. * [x] [hexops/dawn](https://github.com/hexops/dawn) WebGPU, our largest C++ dependency and it's C++ dependencies (we use prebuilt binaries by default) * ObjC/ObjC++ * [ ] [hexops/glfw](https://github.com/hexops/glfw) which has various ObjC `.m` files. We can achieve this by ensuring that the above dependencies are either eliminated, or are using a prebuilt static library with a C ABI - like we do for Dawn today. The binaries may still be built using Zig, and there should still be a very clear path to building 100% from source if we go that route. This issue is just describing the 'out of the box Debug build' experience.
Sign in to join this conversation.
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
hexops/mach#1100
No description provided.