bpo-30345: Add -g to LDFLAGS for LTO (GH-7709) (GH-7825)

Add -g to LDFLAGS when compiling with LTO to get debug symbols.
This commit is contained in:
Victor Stinner 2018-06-22 09:11:33 +02:00 committed by GitHub
parent 7b383a5714
commit 319cfb5f30
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 15 additions and 0 deletions

View File

@ -0,0 +1 @@
Add -g to LDFLAGS when compiling with LTO to get debug symbols.

7
configure vendored
View File

@ -6481,6 +6481,13 @@ 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
fi

View File

@ -1455,6 +1455,13 @@ 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
fi