76 points · by burglins · 2y ago · 12 comments
All you have to do is to make your CC this:
cilly --noPrintLn --merge --keepmerged
And in the end after compilation there will be a file named yourproject_comb.c
It's weird that this is still true even though compilers are now capable of whole program optimization at link time. Enabling LTO should be equivalent to compiling everything as a single translation unit but apparently it isn't. I wonder what exactly inhibits the aforementioned inter-procedural and code inlining optimizations in LTO builds.
Perhaps similar in structure. But different in both goal and output.