Skip to content

Commit f697cfe

Browse files
committed
docs: improve the rendering of the HarmonyOS build instructions
1 parent eda80f4 commit f697cfe

File tree

1 file changed

+23
-12
lines changed

1 file changed

+23
-12
lines changed

docs/install.md

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -711,25 +711,36 @@ to the minimum iOS version you want to target and execute this file to build the
711711
712712
### HarmonyOS
713713
714-
For this target you will need the cross-compiler toolchain package by Huawei, which contains solutions for both Windows and Linux. Only the Linux-based
715-
toolchain has been tested so far, but the following instructions may apply similarly to Windows:
716-
717-
Download https://repo.huaweicloud.com/harmonyos/os/4.1.1-Release/ohos-sdk-windows_linux-public.tar.gz (or whatever newer version may be available in the future). Use tar xvf ohos-sdk-windows_linux_public.tar.gz to unpack it somewhere on your system. This will create a folder named "ohos-sdk" with subfolders "linux" and "windows". In the linux one you will find a ZIP archive named "native-linux-x64-4.1.7.8-Release.zip" - you need to unzip this where you want to
718-
install the cross-compiler, for example in /opt/ohos-sdk.
714+
For this target you will need the cross-compiler toolchain package by Huawei,
715+
which contains solutions for both Windows and Linux. Only the Linux-based
716+
toolchain has been tested so far, but the following instructions may apply
717+
similarly to Windows:
718+
719+
Download [this HarmonyOS 4.1.1 SDK](https://repo.huaweicloud.com/harmonyos/os/4.1.1-Release/ohos-sdk-windows_linux-public.tar.gz),
720+
or whatever newer version may be available in the future). Use `tar -xvf
721+
ohos-sdk-windows_linux_public.tar.gz` to unpack it somewhere on your system.
722+
This will create a folder named "ohos-sdk" with subfolders "linux" and
723+
"windows". In the linux one you will find a ZIP archive named
724+
`native-linux-x64-4.1.7.8-Release.zip` - you need to unzip this where you want
725+
to install the cross-compiler, for example in `/opt/ohos-sdk`.
719726
720727
In the directory where you unpacked OpenBLAS, create a build directory for cmake, and change into it :
721-
```
728+
```bash
722729
mkdir build
723730
cd build
724731
```
725-
Use the version of `cmake` that came with the SDK, and specify the location of its toolchain file as a cmake option. Also set the build target for OpenBLAS to ARMV8 and specify NOFORTRAN=1 (at least as of version 4.1.1, the SDK contains no Fortran compiler):
726-
```
727-
/opt/ohos-sdk/linux/native/build-tools/cmake/bin/cmake -DCMAKE_TOOLCHAIN_FILE=/opt/ohos-sdk/linux/native/build/cmake/ohos.toolchain.cmake \
732+
Use the version of `cmake` that came with the SDK, and specify the location of
733+
its toolchain file as a cmake option. Also set the build target for OpenBLAS to
734+
`ARMV8` and specify `NOFORTRAN=1` (at least as of version 4.1.1, the SDK
735+
contains no Fortran compiler):
736+
```bash
737+
/opt/ohos-sdk/linux/native/build-tools/cmake/bin/cmake \
738+
-DCMAKE_TOOLCHAIN_FILE=/opt/ohos-sdk/linux/native/build/cmake/ohos.toolchain.cmake \
728739
-DOHOS_ARCH="arm64-v8a" -DTARGET=ARMV8 -DNOFORTRAN=1 ..
729740
```
730-
Additional other OpenBLAS build options like USE_OPENMP=1 or DYNAMIC_ARCH=1 will probably work too.
731-
Finally do the build:
732-
```
741+
Additional other OpenBLAS build options like `USE_OPENMP=1` or `DYNAMIC_ARCH=1`
742+
will probably work too. Finally do the build:
743+
```bash
733744
/opt/ohos-sdk/linux/native/build-tools/cmake/bin/cmake --build .
734745
```
735746

0 commit comments

Comments
 (0)