diff options
author | Miss Islington (bot) <31488909+miss-islington@users.noreply.github.com> | 2022-09-23 03:20:50 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-09-23 03:20:50 (GMT) |
commit | 29f17a4ad8bd92539aab9cb4af64b581d1ba9ae6 (patch) | |
tree | 1814bc36f273637df8bb61921a4bd13a6b138168 /configure.ac | |
parent | 9eb1e6c692a2f1cc8e34c312b3dc6f24e9466b56 (diff) | |
download | cpython-29f17a4ad8bd92539aab9cb4af64b581d1ba9ae6.zip cpython-29f17a4ad8bd92539aab9cb4af64b581d1ba9ae6.tar.gz cpython-29f17a4ad8bd92539aab9cb4af64b581d1ba9ae6.tar.bz2 |
gh-96761: Fix build process of the clang compiler for _bootstrap_python (gh-96945)
Co-authored-by: Matthias Goergens <matthias.goergens@gmail.com>
(cherry picked from commit 83d84e67cd203cc75687152e57572895f56245fa)
Co-authored-by: Dong-hee Na <donghee.na@python.org>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/configure.ac b/configure.ac index d9a6f68..79dc1f1 100644 --- a/configure.ac +++ b/configure.ac @@ -1782,7 +1782,7 @@ then fi AC_MSG_RESULT($PROFILE_TASK) -# Make llvm-relatec checks work on systems where llvm tools are not installed with their +# Make llvm-related checks work on systems where llvm tools are not installed with their # normal names in the default $PATH (ie: Ubuntu). They exist under the # non-suffixed name in their versioned llvm directory. @@ -1836,8 +1836,10 @@ esac if test "$Py_LTO" = 'true' ; then case $CC in *clang*) - dnl flag to disable lto during linking LDFLAGS_NOLTO="-fno-lto" + dnl Clang linker requires -flto in order to link objects with LTO information. + dnl Thin LTO is faster and works for object files with full LTO information, too. + AX_CHECK_COMPILE_FLAG([-flto=thin],[LDFLAGS_NOLTO="-flto=thin"],[LDFLAGS_NOLTO="-flto"]) AC_SUBST(LLVM_AR) AC_PATH_TOOL(LLVM_AR, llvm-ar, '', ${llvm_path}) AC_SUBST(LLVM_AR_FOUND) |