Skip to content

Commit 33078d1

Browse files
authored
stress importance of TARGET setting in DYNAMIC_ARCH builds
1 parent 457d1c6 commit 33078d1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

README.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -254,8 +254,10 @@ On **riscv64**, DYNAMIC_ARCH enables support for riscv64_zvl128b and riscv64_zvl
254254

255255
On **LoongArch64**, it comprises LA264 and LA464 as well as generic LoongArch64 support.
256256

257-
The `TARGET` option can be used in conjunction with `DYNAMIC_ARCH=1` to specify which cpu model should be assumed for all the
258-
common code in the library, usually you will want to set this to the oldest model you expect to encounter.
257+
The `TARGET` option can - and usually **should** - be used in conjunction with `DYNAMIC_ARCH=1` to specify which cpu model should be assumed for all the common code in the library, usually you will want to set this to the oldest model you expect to encounter.
258+
Failure to specify this may lead to advanced instructions being used by the compiler, just because the build host happens to support them. This is most likely to happen when aggressive optimization options are in effect, and the resulting library may then crash with an
259+
illegal instruction error on weaker hardware, before it even reaches the BLAS routines specifically included for that cpu.
260+
259261
Please note that it is not possible to combine support for different architectures, so no combined 32 and 64 bit or x86_64 and arm64 in the same library.
260262

261263
### Supported OS

0 commit comments

Comments
 (0)