This page describes how to set up a build environment for LibreOffice on macOS 10.14.4. Building master requires Xcode 11.3 or later, which requires macOS 10.14.4 or later.
- Install Xcode from the App Store.
- Start Xcode at least once (you don't need to open or create any project)
- Download and install a JDK (Java SE Development Kit): Oracle's Java SE Development Kit
See platform-independent tips at Development/GenericBuildingHints
Building in a ssh session
In some cases it seems that if you are building in a ssh session, some unit tests fail unless you also have a windowing session open to the machine, either on the physical console or through Screen Sharing.
Building LibreOffice takes time, a lot of time. Exactly how much depends on how powerful your machine is. But there are tools you can use to speed-up things.
ccache is short for compiler cache - and it is exactly that. It saves tons of time by not running the actual compiler when little has changed in the source codebetween two builds. But note that unless you explicitly do "make clean" often, that is not typically the case, and using ccache just because you think it maybe helps is not a good idea.
Get it here: 
Build it like this:
./configure make make install
You will also need to ensure the following is defined, e.g. in .bashrc, if using ccache (see Development/Building LibreOffice with Clang for full details), otherwise clang will report errors and show unnecessary warnings:
The default cache limit (5 GB) is not large enough to be useful for a LibreOffice build, but you can increase it:
ccache --max-size 16 G && ccache -s
Upgrading to a recent macOS on unsupported machines
With macOS Mojave Patcher and Catalina Patcher tools it is possible to install current macOSes on older, unsupported machines, see this video for details. Read Known issues on the tool's site, and try at your own risk.
Build the UNO SDK
One option is to install Doxygen from its website and make sure the
doxygen executable is found on the
PATH, or specify its exact location via
--with-doxygen=pathname configure switch.
Another option is to configure
--without-doxygen, in which case the HTML documentation for the C++ UNO interface will be missing from the UNO SDK being built.