bpo-30345: Add -g to LDFLAGS for LTO (GH-7709)
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
This commit is contained in:
parent
c44d8e5db6
commit
06fe77a84b
|
@ -0,0 +1 @@
|
|||
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
|
|
@ -6427,6 +6427,14 @@ if test "$Py_LTO" = 'true' ; then
|
|||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$ac_cv_prog_cc_g" = "yes"
|
||||
then
|
||||
# bpo-30345: Add -g to LDFLAGS when compiling with LTO
|
||||
# to get debug symbols.
|
||||
LTOFLAGS="$LTOFLAGS -g"
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS $LTOFLAGS"
|
||||
LDFLAGS="$LDFLAGS $LTOFLAGS"
|
||||
fi
|
||||
|
|
|
@ -1302,6 +1302,14 @@ if test "$Py_LTO" = 'true' ; then
|
|||
esac
|
||||
;;
|
||||
esac
|
||||
|
||||
if test "$ac_cv_prog_cc_g" = "yes"
|
||||
then
|
||||
# bpo-30345: Add -g to LDFLAGS when compiling with LTO
|
||||
# to get debug symbols.
|
||||
LTOFLAGS="$LTOFLAGS -g"
|
||||
fi
|
||||
|
||||
CFLAGS="$CFLAGS $LTOFLAGS"
|
||||
LDFLAGS="$LDFLAGS $LTOFLAGS"
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue