Procházet zdrojové kódy

README: explain parallel build [no ci] (#7618)

Johannes Gäßler před 1 rokem
rodič
revize
972b555ab9
1 změnil soubory, kde provedl 16 přidání a 9 odebrání
  1. 16 9
      README.md

+ 16 - 9
README.md

@@ -315,8 +315,6 @@ In order to build llama.cpp you have four different options.
       make
       make
       ```
       ```
 
 
-      **Note**: for `Debug` builds, run `make LLAMA_DEBUG=1`
-
   - On Windows:
   - On Windows:
 
 
     1. Download the latest fortran version of [w64devkit](https://github.com/skeeto/w64devkit/releases).
     1. Download the latest fortran version of [w64devkit](https://github.com/skeeto/w64devkit/releases).
@@ -328,23 +326,32 @@ In order to build llama.cpp you have four different options.
         make
         make
         ```
         ```
 
 
+  - Notes:
+    - For faster compilation, add the `-j` argument to run multiple jobs in parallel. For example, `make -j 8` will run 8 jobs in parallel.
+    - For faster repeated compilation, install [ccache](https://ccache.dev/).
+    - For debug builds, run `make LLAMA_DEBUG=1`
+
 - Using `CMake`:
 - Using `CMake`:
 
 
-    ```bash
-    cmake -B build
-    cmake --build build --config Release
-    ```
+  ```bash
+  cmake -B build
+  cmake --build build --config Release
+  ```
+
+  **Notes**:
 
 
-    **Note**: for `Debug` builds, there are two cases:
+    - For faster compilation, add the `-j` argument to run multiple jobs in parallel. For example, `cmake --build build --config Release -j 8` will run 8 jobs in parallel.
+    - For faster repeated compilation, install [ccache](https://ccache.dev/).
+    - For debug builds, there are two cases:
 
 
-    - Single-config generators (e.g. default = `Unix Makefiles`; note that they just ignore the `--config` flag):
+      1. Single-config generators (e.g. default = `Unix Makefiles`; note that they just ignore the `--config` flag):
 
 
       ```bash
       ```bash
       cmake -B build -DCMAKE_BUILD_TYPE=Debug
       cmake -B build -DCMAKE_BUILD_TYPE=Debug
       cmake --build build
       cmake --build build
       ```
       ```
 
 
-    - Multi-config generators (`-G` param set to Visual Studio, XCode...):
+      2. Multi-config generators (`-G` param set to Visual Studio, XCode...):
 
 
       ```bash
       ```bash
       cmake -B build -G "Xcode"
       cmake -B build -G "Xcode"