libmakepkg: add extra buildflags only when buildflags is not disabled
This means options=('!buildflags') will disable the addition of CFLAG etc for LTO and debug building. Signed-off-by: Allan McRae <allan@archlinux.org>
This commit is contained in:
parent
a8d9fb8d9c
commit
42fe4864a0
2 changed files with 2 additions and 2 deletions
|
@ -29,7 +29,7 @@ source "$LIBRARY/util/option.sh"
|
||||||
buildenv_functions+=('buildenv_debugflags')
|
buildenv_functions+=('buildenv_debugflags')
|
||||||
|
|
||||||
buildenv_debugflags() {
|
buildenv_debugflags() {
|
||||||
if check_option "debug" "y"; then
|
if check_option "debug" "y" && ! check_option "buildflags" "n"; then
|
||||||
DEBUG_CFLAGS+=" -ffile-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
|
DEBUG_CFLAGS+=" -ffile-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
|
||||||
DEBUG_CXXFLAGS+=" -ffile-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
|
DEBUG_CXXFLAGS+=" -ffile-prefix-map=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
|
||||||
DEBUG_RUSTFLAGS+=" --remap-path-prefix=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
|
DEBUG_RUSTFLAGS+=" --remap-path-prefix=$srcdir=${DBGSRCDIR:-/usr/src/debug}"
|
||||||
|
|
|
@ -30,7 +30,7 @@ build_options+=('lto')
|
||||||
buildenv_functions+=('buildenv_lto')
|
buildenv_functions+=('buildenv_lto')
|
||||||
|
|
||||||
buildenv_lto() {
|
buildenv_lto() {
|
||||||
if check_option "lto" "y"; then
|
if check_option "lto" "y" && ! check_option "buildflags" "n"; then
|
||||||
CFLAGS+=" -flto"
|
CFLAGS+=" -flto"
|
||||||
CXXFLAGS+=" -flto"
|
CXXFLAGS+=" -flto"
|
||||||
LDFLAGS+=" -flto"
|
LDFLAGS+=" -flto"
|
||||||
|
|
Loading…
Add table
Reference in a new issue