User:Hossein/Build/macOSarm

This manual is for building LibreOffice for macOS using Apple Silicon. If this does match your platform, please refer to the development page on Wiki to find the correct build instructions.

LibreOffice Versions
This manual is written for the LibreOffice Dev 7.4, which is the latest git master.

Dependencies
This manual is suitable for macOS 10.14.4. Building master requires Xcode 11.3 or later, which requires macOS 10.14.4 or later.

First you should install the dependencies:

Xcode
Install Xcode from the App Store. The intent is that LibreOffice will always be buildable with the current Xcode on current macOS. Then run Xcode at least once (you don't need to open or create any project)

Java
You need Java Development Kit (JDK) Version 11 or later. Make sure that you download a ARM64 JDK. You can download it from different sources:


 * microsoft.com (Microsoft builds do not require login) You should select AArch64 / M1 for macOS.
 * oracle.com (Oracle requires login to download) You should select Arm 64 for macOS.
 * Adoptium (Adoptium installer will not be auto detected by default installation. You have to enable the "JavaSoft (Oracle) registry keys" option) You should select aarch64 for macOS.

Java is optional. If you want to avoid Java, use the  option in your.

Cloning and building
Next, we  the repository and start to build:

You should have a suitable configuration for the build. A sample  for building LibreOffice on Linux can be as follows, to enable debug build, and disable doxygen to save time. Since the  command takes a vast quantity of time to run for the first time, you probably would like to save time by specifying the settings you'd need depending on the ultimate goal of your build.

Then you can start to build LibreOffice:

Run LibreOffice
When the build has finished without errors, you can run your fresh build of LibreOffice using:

Using LibreOffice with an IDE
An integrated development environment (IDE) helps developers to have a better coding experience. Considering the fact that LibreOffice has a very large code base, you may use an IDE to simplify coding, building and debugging LibreOffice. You can use several IDEs to work on LibreOffice, including Visual Studio, Visual Studio Code, Qt Creator, KDevelop, Vim, Eclipse CDT and several others.

You can refer to the wiki article Development/IDE to understand how to use IDEs.