diff options
author | Victor Stinner <vstinner@redhat.com> | 2018-06-22 09:11:33 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-06-22 09:11:33 +0200 |
commit | 319cfb5f30c2f5da0cdcd556574727ca347cb7de (patch) | |
tree | 968fa8b5992699b89cdacd814baefb1854914ba8 /configure.ac | |
parent | 7b383a57145046a6a6ad6cd26f3139163df07885 (diff) | |
download | cpython-git-319cfb5f30c2f5da0cdcd556574727ca347cb7de.tar.gz |
bpo-30345: Add -g to LDFLAGS for LTO (GH-7709) (GH-7825)
Add -g to LDFLAGS when compiling with LTO to get debug symbols.
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac index 913d5469d0..36625f7b82 100644 --- a/configure.ac +++ b/configure.ac @@ -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 |