JUCE8 Harfbuzz sources contain many #line directives. This confuses ccache and prevents Harfbuzz compilation from landing in the cache, always calling the compiler instead and slowing down compilation.
Please consider filtering all lines from harfbuzz .hh derivative files that start with #line
I forked the repo and patched it for my projects. In fact, I have a bunch of patches. But an unmodified JUCE repo won’t play well with ccache or distcc for this reason. Since those files are pretty much baked in and not generated from the harfbuzz source during juce build, I think deleting #line and submitting it to the mainline repo shouldn’t be a big deal.
PS, generally speaking, I would’ve preferred to have an option for switching Harfbuzz off, even if the consequence is that font layout is going to be suboptimal for Khmer and Xhosa, or different on different OSs. It seems like Harfbuzz is adding a lot of bloat to the source base for the sake of mostly handling isolated corner cases.
Understood. Though, I have to say, Harfbuzz is definitely worth the effort. Think of all the amazing things that could be done with font-oriented ligatures! For years I’ve dreamed of having the entirety of a rich, music-oriented interface, packed into a single font … think FF Chartwell[0], but for music symbols and other plugin-tastic symbology!
Sure. In my case, I’m just doing a small limiter plugin with a rather primitive interface and a piano synth. It’s a universal binary, and juce_graphics_Harfbuzz.cpp.o is 3MB in size. Every JUCE-compiled binary in my project has an increase of +2.7MB between JUCE7 and JUCE8.
Also, without ccache, it spends a minute compiling just Harfbuzz alone, and it does it several times for several configurations. With ccache (and Harfbuzz patched) the total multi-architecture multi-OS build time with digital signing takes about 35 seconds.
I may be seeing this with mozilla’s sccache. My CI times have slowed way down and I’m not seeing cache hits like before. I will have to test against JUCE 7 and report back.
Harfbuzz is awesome though! It makes text on win/mac identical, total life saver compared with second guessing and tweaking everything. I’m pretty happy about all the hard work that went into that.