I wasn't looking forward to trying to remote-debug the builds on mac by building them on GitHub containers, downloading the artifacts, pushing to GitHub and repeating again.
So I caved and bought a Macbook Air.
I hacked together a makefile that could build the bootstrap executable, but then I went through the labor of figuring out how to get a legitimate build... with warnings turned up to errors... on Clang under zsh on Mac.
And today I got that to work.
<gcc:XXX> vs <gnu:XXX> vs <clang:XXX>
One of the design ideas Shixin had for Rebmake was that you could specity compiler flags and such either literally as a string, or you could make them conditional by making them tags.
So if you had a file and you wanted to say disable errors pertaining to sign comparison, you might put your file in the files list as:
[%some-file.c <gcc:-Wno-sign-compare> <msc:/wd4388>]
Then what would happen is that if you were building with gcc you'd get the compiler switch -Wno-sign-compare but if you were building with Microsoft CL you'd get /wd4388 (warning-disable)
This was a pretty good idea, but the problem is that while Clang and GCC share many warnings in common, there are exceptions.
So I subdivided it so that flags which are common to both are <gcc:XXX>. This makes sense given that Clang came after gcc, and adopted their warning lists to begin with.
Then GCC-specific flags are <gnu:XXX> and Clang-specific flags are <clang:XXX>
Eliminating Separate Compiler / Linker Abstractions
To make a long story short: in the C world, there are "compiler front ends" and you typically can get away with using the program that does the compiling (e.g. GCC) to delegate to the linker (e.g. LD) to do the linking for you. In fact: you typically don't want to call the linker explicitly, because there's a bunch of fiddly stuff the front end figures out for you.
But Rebmake had the idea of trying to call linkers explicitly, and decoupling the linker from the compiler. This led to repeated work--and things like having to know the minor nuances of how GCC's LD was different from LLVM-LINK.
I just wiped that code out and gave the compiler abstraction LINK and COMPILE methods, and reduced the number of moving parts considerably. This was part of making it easier to pare down things to really let the clang vs. gcc share as much code in common as possible, while still differentiating which tags held compiler switches that applied to them.
Rebmake Gets Less Beastly Every Time...
I've always dreaded having to mess with Rebmake. But I have already credited it with being a huge source of inspiration on how to make the language less inscrutable. Necessity was the mother of invention, and all the hardships of Rebmake helped make Ren-C better.
Anyway, hacking on it to get it to cleanly support the M4 / zsh / Clang builds led to some improvemnet. And I think that as string interpolation and other features make their way into it, there might be some light at the end of the Rebmake tunnel...
