Skip to content

Commit f4f53e4

Browse files
committed
Update README about caching
1 parent e7525cd commit f4f53e4

File tree

1 file changed

+10
-3
lines changed

1 file changed

+10
-3
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ The package provides a source of [BLAS] and [LAPACK] via [OpenBLAS].
88

99
The following Cargo features are supported:
1010

11-
* `cache` to build in `.cargo` instead of `target` (see below),
11+
* `cache` to build in shared directory e.g. `$XDG_DATA_HOME/openblas_build/` instead of `target` (see below),
1212
* `cblas` to build CBLAS (enabled by default),
1313
* `lapacke` to build LAPACKE (enabled by default),
1414
* `static` to link to OpenBLAS statically, and
@@ -17,10 +17,17 @@ The following Cargo features are supported:
1717
## Caching
1818

1919
The `cache` feature allows the OpenBLAS build products to be reused between
20-
crates that have different `target` directories. This avoids rebuilding OpenBLAS
21-
unnecessarily. However, this also prevents `cargo clean` from working properly,
20+
crates that have different `target` directories.
21+
This avoids rebuilding OpenBLAS unnecessarily.
22+
However, this also prevents `cargo clean` from working properly,
2223
since the aforementioned build products will not be removed by the command.
2324

25+
The OpenBLAS binary will be placed at `$XDG_DATA_HOME/openblas_build/[hash of build configure object]`.
26+
For example, build with LAPACK and build without LAPACK will be placed on different directories.
27+
If you build OpenBLAS as a shared library, you need to add the above directory to
28+
`LD_LIBRARY_PATH` (for Linux) or `DYLD_LIBRARY_PATH` (for macOS).
29+
Since build from source is not supported on Windows (see next section), this feature is also not supported.
30+
2431
## Windows and vcpkg
2532

2633
On Windows, `openblas-src` relies on [vcpkg] to find OpenBLAS. Before building,

0 commit comments

Comments
 (0)