Rodrigo Mesquita pushed to branch wip/romes/26227 at Glasgow Haskell Compiler / GHC

Commits:

4 changed files:

Changes:

  • compiler/GHC/Driver/Session.hs
    ... ... @@ -3528,6 +3528,10 @@ compilerInfo dflags
    3528 3528
            ("target os string",            stringEncodeOS (platformOS (targetPlatform dflags))),
    
    3529 3529
            ("target arch string",          stringEncodeArch (platformArch (targetPlatform dflags))),
    
    3530 3530
            ("target word size in bits",    show (platformWordSizeInBits (targetPlatform dflags))),
    
    3531
    +       -- keep "duplicate" of "Have interpreter" for backwards compatibility,
    
    3532
    +       -- since we used to show both...
    
    3533
    +       -- These should really be called "Has internal interpreter"
    
    3534
    +       ("Use interpreter",             showBool $ platformMisc_ghcWithInterpreter $ platformMisc dflags),
    
    3531 3535
            ("Have interpreter",            showBool $ platformMisc_ghcWithInterpreter $ platformMisc dflags),
    
    3532 3536
            ("Object splitting supported",  showBool False),
    
    3533 3537
            ("Have native code generator",  showBool $ platformNcgSupported platform),
    

  • compiler/GHC/Settings/IO.hs
    ... ... @@ -146,8 +146,6 @@ initSettings top_dir = do
    146 146
             pure (ld_r_path, map Option ld_r_args)
    
    147 147
           iserv_prog   = libexec "ghc-iserv"
    
    148 148
     
    
    149
    -  ghcWithInterpreter <- getBooleanSetting "Use interpreter"
    
    150
    -
    
    151 149
       baseUnitId <- getSetting_raw "base unit-id"
    
    152 150
     
    
    153 151
       return $ Settings
    
    ... ... @@ -227,7 +225,7 @@ initSettings top_dir = do
    227 225
         , sTargetPlatform = platform
    
    228 226
         , sPlatformMisc = PlatformMisc
    
    229 227
           { platformMisc_targetPlatformString = targetPlatformTriple target
    
    230
    -      , platformMisc_ghcWithInterpreter = ghcWithInterpreter
    
    228
    +      , platformMisc_ghcWithInterpreter = ghcWithInternalInterpreter
    
    231 229
           , platformMisc_libFFI = tgtUseLibffiForAdjustors target
    
    232 230
           , platformMisc_llvmTarget = tgtLlvmTarget target
    
    233 231
           , platformMisc_targetRTSLinkerOnlySupportsSharedLibs = tgtRTSLinkerOnlySupportsSharedLibs target
    
    ... ... @@ -253,3 +251,13 @@ getTargetPlatform Target{..} = Platform
    253 251
         , platformHasLibm = tgtHasLibm
    
    254 252
         , platform_constants = Nothing -- will be filled later when loading (or building) the RTS unit
    
    255 253
         }
    
    254
    +
    
    255
    +
    
    256
    +-- | Do we have an internal interpreter?
    
    257
    +ghcWithInternalInterpreter :: Bool
    
    258
    +#if defined(HAVE_INTERNAL_INTERPRETER)
    
    259
    +ghcWithInternalInterpreter = True
    
    260
    +#else
    
    261
    +ghcWithInternalInterpreter = False
    
    262
    +#endif
    
    263
    +

  • hadrian/bindist/Makefile
    ... ... @@ -86,7 +86,6 @@ WrapperBinsDir=${bindir}
    86 86
     lib/settings : config.mk
    
    87 87
     	@rm -f $@
    
    88 88
     	@echo '[("unlit command", "$$topdir/../bin/$(CrossCompilePrefix)unlit")' >> $@
    
    89
    -	@echo ',("Use interpreter", "$(GhcWithInterpreter)")' >> $@
    
    90 89
     	@echo ',("RTS ways", "$(GhcRTSWays)")' >> $@
    
    91 90
     	@echo ',("Relative Global Package DB", "package.conf.d")' >> $@
    
    92 91
     	@echo ',("base unit-id", "$(BaseUnitId)")' >> $@
    

  • hadrian/src/Rules/Generate.hs
    ... ... @@ -484,7 +484,6 @@ generateSettings settingsFile = do
    484 484
     
    
    485 485
         settings <- traverse sequence $
    
    486 486
             [ ("unlit command", ("$topdir/../bin/" <>) <$> expr (programName (ctx { Context.package = unlit })))
    
    487
    -        , ("Use interpreter", expr $ yesNo <$> ghcWithInterpreter (predStage stage))
    
    488 487
             , ("RTS ways", escapeArgs . map show . Set.toList <$> getRtsWays)
    
    489 488
             , ("Relative Global Package DB", pure rel_pkg_db)
    
    490 489
             , ("base unit-id", pure base_unit_id)