From 0122828820ec822cf917c1b2a6467c846d0e8511 Mon Sep 17 00:00:00 2001 From: Cheng Shao <terrorjack@type.dance> Date: Thu, 3 Oct 2024 16:45:04 +0000 Subject: [PATCH] hadrian: disable internal-interpreter of ghc library when cross compiling This commit disable the internal-interpreter flag of ghc library when cross compiling, only external interpreter works in such cases. (cherry picked from commit f232c872c6adf4472b5a1c88812c57aa2aa76cbe) (cherry picked from commit 4e7d0cee8acb2210eb0e1ab12f3200b59afe10ac) (cherry picked from commit 624335b22fe1809a4fa84fdd069eb92eac3c06d8) --- hadrian/src/Settings/Packages.hs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/hadrian/src/Settings/Packages.hs b/hadrian/src/Settings/Packages.hs index a864e3bbd8f..3da4845cfb7 100644 --- a/hadrian/src/Settings/Packages.hs +++ b/hadrian/src/Settings/Packages.hs @@ -75,7 +75,15 @@ packageArgs = do , (getStage >>= expr . askGhcProfiled) ? arg "--ghc-pkg-option=--force" ] , builder (Cabal Flags) ? mconcat - [ andM [expr ghcWithInterpreter, notStage0] `cabalFlag` "internal-interpreter" + -- For the ghc library, internal-interpreter only makes + -- sense when we're not cross compiling. For cross GHC, + -- external interpreter is used for loading target code + -- and internal interpreter is supposed to load native + -- code for plugins (!7377), however it's unfinished work + -- (#14335) and completely untested in CI for cross + -- backends at the moment, so we might as well disable it + -- for cross GHC. + [ andM [expr ghcWithInterpreter, notStage0, notCross] `cabalFlag` "internal-interpreter" , notM cross `cabalFlag` "terminfo" , arg "-build-tool-depends" ] -- GitLab