BTW: Most compiled languages have good linkers and postprocessors. They strip out unused executable.
The compile might take a while, but the resulting binary may not be as big as you think.
This does not apply, however, to interpreted languages, like JS.
Not sure about "JIT" languages, though, like Python and PHP.