top | item 28459804

(no title)

mishafb | 4 years ago

Zig has painless cross compilation, with gcc or clang it's a nightmare

discuss

order

pjmlp|4 years ago

I would like to see that painless cross compilation for UWP applications.

Truth is that cross compilation always breaks down in complex deployment use cases.

int_19h|4 years ago

In principle, why wouldn't it work for C++/WinRT, given that it doesn't use the WinMD metadata directly, but rather produces valid C++ headers from it?

I think the problem for Zig is that they use MinGW as their Windows target, and the latter's standard library isn't really UWP compatible (yet?).

dleslie|4 years ago

o.O

Zig uses LLVM for cross compilation, and so does clang. It's really not any better.

https://clang.llvm.org/docs/CrossCompilation.html

messe|4 years ago

The part that Zig does well, is that it bundles C headers and standard library sources with it. This is the hard part of cross compilation. The default install can build standalone executables from C programs for any supported platform.