C{,XX}FLAGS: change -fdebug-prefix-map for cmake and meson

Both of them build inside a builddir. This change ease the debugging
process.
This commit is contained in:
Đoàn Trần Công Danh 2022-08-24 08:24:03 +07:00 committed by Đoàn Trần Công Danh
parent 59252cbf74
commit 95159532cc
1 changed files with 13 additions and 2 deletions

View File

@ -1,2 +1,13 @@
CFLAGS="${CFLAGS} -fdebug-prefix-map=$wrksrc=."
CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$wrksrc=."
case "$build_style" in
cmake)
CFLAGS="${CFLAGS} -fdebug-prefix-map=$wrksrc/${cmake_builddir:-build}=."
CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$wrksrc/${cmake_builddir:-build}=."
;;
meson)
CFLAGS="${CFLAGS} -fdebug-prefix-map=$wrksrc/${meson_builddir:-build}=."
CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$wrksrc/${meson_builddir:-build}=."
;;
*)
CFLAGS="${CFLAGS} -fdebug-prefix-map=$wrksrc=."
CXXFLAGS="${CXXFLAGS} -fdebug-prefix-map=$wrksrc=."
esac