mirror of
https://codeberg.org/dnkl/foot.git
synced 2026-02-05 04:06:08 -05:00
install: remove -march=native
This simplifies the instructions. People interested in performance are likely to know how to use it.
This commit is contained in:
parent
a83f2448bc
commit
aa13dfb4e8
1 changed files with 4 additions and 8 deletions
12
INSTALL.md
12
INSTALL.md
|
|
@ -142,17 +142,13 @@ optimization.
|
|||
In addition to being faster, PGO builds also tend to be smaller than
|
||||
regular `-O3` builds.
|
||||
|
||||
**Note**: if you are packaging foot, you should probably remove
|
||||
`-march=native`, as that may cause gcc/clang to emit instructions that
|
||||
may not be available on other computers.
|
||||
|
||||
|
||||
#### Size optimized
|
||||
|
||||
To optimize for size (i.e. produce a small binary):
|
||||
|
||||
```sh
|
||||
export CFLAGS="$CFLAGS -Os -march=native"
|
||||
export CFLAGS="$CFLAGS -Os"
|
||||
meson --buildtype=release --prefix=/usr -Db_lto=true ../..
|
||||
ninja
|
||||
ninja test
|
||||
|
|
@ -164,7 +160,7 @@ ninja install
|
|||
To do a regular, non-PGO build optimized for performance:
|
||||
|
||||
```sh
|
||||
export CFLAGS="$CFLAGS -O3 -march=native"
|
||||
export CFLAGS="$CFLAGS -O3"
|
||||
meson --buildtype=release --prefix=/usr -Db_lto=true ../..
|
||||
ninja
|
||||
ninja test
|
||||
|
|
@ -180,7 +176,7 @@ slower!) binary.
|
|||
First, configure the build directory:
|
||||
|
||||
```sh
|
||||
export CFLAGS="$CFLAGS -O3 -march=native -Wno-missing-profile"
|
||||
export CFLAGS="$CFLAGS -O3 -Wno-missing-profile"
|
||||
meson --buildtype=release --prefix=/usr -Db_lto=true ../..
|
||||
```
|
||||
|
||||
|
|
@ -190,7 +186,7 @@ later have a regression where PGO with `-O2` is **much** slower.
|
|||
If you are using Clang instead of GCC, use the following `CFLAGS` instead:
|
||||
|
||||
```sh
|
||||
export CFLAGS="$CFLAGS -O3 -march=native \
|
||||
export CFLAGS="$CFLAGS -O3 \
|
||||
-Wno-ignored-optimization-argument \
|
||||
-Wno-profile-instr-out-of-date \
|
||||
-Wno-profile-instr-unprofiled"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue