4 ms·
Not that this is terribly relevant to the discussion, but back in the day, I did try compiling bzflag with zig cc and then with clang, and the first executable
by Rounin 5y ago
Not that this is terribly relevant to the discussion, but back in the day, I did try compiling bzflag with zig cc and then with clang, and the first executable crashed, while the second worked.
Despite being told numerous compile-time options to use by different manuals and documents and people on IRC, nothing appeared to change the outcome. It might be due to some undefined behaviour in bzflag, of course, but it made zig cc a non-starter for C.
- ifreund 5y agoThis is due to zig enabling clangs UBSAN by default in unoptimized builds. This can be disabled with `-fno-sanitize=undefined` or by enabling optimizations with `-O2` or `-O3`. https://github.com/ziglang/zig/issues/4830#issuecomment-605491606 https://github.com/ziglang/zig/issues/4830#issuecomment-6054...
- Rounin 5y agoWell, as mentioned, I got a whole list of different compile-time options to try - no-this and no-that, but the executable still crashed in the end.
- matu3ba 5y agoPlease be specific with version numbers. Did you file an upstream bug already? Do you mean https://github.com/BZFlag-Dev/bzflag https://github.com/BZFlag-Dev/bzflag ? Thats c++ and must be compiled with zig c++.
- Rounin 5y agoAh, well, it must have been zig c++, then, necessarily. Was I planning to file an upstream bug? I was unaware. I did contact them about it, actually, but it wasn't solved at the time.
- DrBazza 5y agoApropos of nothing, but found out that the zig compiler can run C++: https://twitter.com/andy_kelley/status/1391468499676008451?s=20 https://twitter.com/andy_kelley/status/1391468499676008451?s...