From dea36de7e34cbdc130bda7da42d8dcc9ff8269ee Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Daniel=20Ekl=C3=B6f?= Date: Mon, 18 May 2020 19:01:22 +0200 Subject: [PATCH] readme: add suggested cflags for a release build --- README.md | 13 ++++++++++--- 1 file changed, 10 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index 6f66c14f..083691a0 100644 --- a/README.md +++ b/README.md @@ -383,16 +383,23 @@ To build, first, create a build directory, and switch to it: mkdir -p bld/release && cd bld/release ``` -Second, configure[^2] the build (if you intend to install it globally, you -might also want `--prefix=/usr`): +Second, configure[^2] the build (suggested flags): ```sh -meson --buildtype=release ../.. +meson --buildtype=release --prefix=/usr \ + -Db_lto=true -Dc_args="-march=native -fno-plt" ../.. ``` [^2]: for advanced users: a profile guided build will have significantly better performance; take a look at [PKDBUILD](PKGBUILD) to see how this can be done. +To instead do a debug build (for example, to be able to provide a +meaningful backtrace when reporting a bug): + +```sh +meson --buildtype=debug ../.. +``` + Three, build it: ```sh ninja