mirror of
https://github.com/python/cpython.git
synced 2025-07-24 03:35:53 +00:00
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
3 changed files with 17 additions and 0 deletions
|
@ -0,0 +1 @@
|
|||
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
|
8
configure
vendored
8
configure
vendored
|
@ -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…
Add table
Add a link
Reference in a new issue