Skip to content

Commit

Permalink
python@3.10: skip LTO on Linux
Browse files Browse the repository at this point in the history
Fixes Homebrew/discussions#3734.

This is essentially the same issue as #112154, except that I'm not aware
of a way to convert the bitcode for GCC. It's possible that there is no
way to do this, given that GCC seems to consider its IR as an internal
implementation detail.

Closes #113036.

Signed-off-by: Sean Molenaar <1484494+SMillerDev@users.noreply.github.com>
Signed-off-by: BrewTestBot <1589480+BrewTestBot@users.noreply.github.com>
  • Loading branch information
carlocab authored and BrewTestBot committed Oct 13, 2022
1 parent ef15517 commit 9bb2014
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion Formula/python@3.10.rb
Original file line number Diff line number Diff line change
Expand Up @@ -142,13 +142,16 @@ def install
--with-openssl=#{Formula["openssl@1.1"].opt_prefix}
--with-dbmliborder=gdbm:ndbm
--enable-optimizations
--with-lto
--with-system-expat
--with-system-ffi
--with-system-libmpdec
]

if OS.mac?
# Enabling LTO on Linux makes libpython3.*.a unusable for anyone whose GCC
# install does not match the one in CI _exactly_ (major and minor version).
# https://github.com/orgs/Homebrew/discussions/3734
args << "--with-lto"
args << "--enable-framework=#{frameworks}"
args << "--with-dtrace"
else
Expand Down

0 comments on commit 9bb2014

Please sign in to comment.