[Git][ghc/ghc][wip/marge_bot_batch_merge_job] 5 commits: Remove cGhcEnableTablesNextToCode

Marge Bot gitlab at gitlab.haskell.org
Tue May 7 05:49:45 UTC 2019



 Marge Bot pushed to branch wip/marge_bot_batch_merge_job at Glasgow Haskell Compiler / GHC


Commits:
27941064 by John Ericson at 2019-05-06T18:59:29Z
Remove cGhcEnableTablesNextToCode

Get "Tables next to code" from the settings file instead.

- - - - -
821fa9e8 by Takenobu Tani at 2019-05-06T19:05:36Z
Remove `$(TOP)/ANNOUNCE` file

Remove `$(TOP)/ANNOUNCE` because maintaining this file is expensive
for each release.

Currently, release announcements of ghc are made on ghc blogs and wikis.

[skip ci]

- - - - -
e172a6d1 by Alp Mestanogullari at 2019-05-06T19:11:43Z
Enable external interpreter when TH is requested but no internal interpreter is available

- - - - -
ba0aed2e by Alp Mestanogullari at 2019-05-06T21:32:56Z
Hadrian: override $(ghc-config-mk), to prevent redundant config generation

This required making the 'ghc-config-mk' variable overridable in
testsuite/mk/boilerplate.mk, and then making use of this in hadrian
to point to '<build root>/test/ghcconfig' instead, which is where we
always put the test config.

Previously, we would build ghc-config and run it against the
GHC to be tested, a second time, while we're running the tests, because some
include testsuite/mk/boilerplate.mk. This was causing unexpected output
failures.

- - - - -
dc2eb364 by Ryan Scott at 2019-05-07T05:49:40Z
Add /includes/dist to .gitignore

As of commit d37d91e9a444a7822eef1558198d21511558515e, the GHC build
now autogenerates a `includes/dist/build/settings` file. To avoid
dirtying the current `git` status, this adds `includes/dist` to
`.gitignore`.

[ci skip]

- - - - -


10 changed files:

- .gitignore
- − ANNOUNCE
- compiler/ghc.mk
- compiler/main/DriverPipeline.hs
- compiler/main/DynFlags.hs
- compiler/main/SysTools.hs
- hadrian/src/Rules/Generate.hs
- hadrian/src/Rules/Test.hs
- includes/ghc.mk
- testsuite/mk/boilerplate.mk


Changes:

=====================================
.gitignore
=====================================
@@ -123,6 +123,7 @@ _darcs/
 /settings
 /ghc.spec
 /ghc/ghc-bin.cabal
+/includes/dist/
 /includes/ghcautoconf.h
 /includes/ghcplatform.h
 /includes/ghcversion.h


=====================================
ANNOUNCE deleted
=====================================
@@ -1,131 +0,0 @@
-
-           ===============================================
-            The Glasgow Haskell Compiler -- version 8.2.2
-           ===============================================
-
-The GHC Team is pleased to announce a new minor release of GHC. This release
-builds on the performance and stability improvements of 8.2.1, fixing a variety
-of correctness bugs, improving error messages, and making the compiler more
-portable.
-
-Notable bug-fixes include
-
- * A correctness issue resulting in segmentation faults in some
-   FFI-users (#13707, #14346)
-
- * A correctness issue resulting in undefined behavior in some programs
-   using STM (#14171)
-
- * A bug which may have manifested in segmentation faults in
-   out-of-memory condition (#14329)
-
- * clearBit of Natural no longer bottoms (#13203)
-
- * A specialisation bug resulting in exponential blowup of compilation
-   time in some specialisation-intensive programs (#14379)
-
- * ghc-pkg now works even in environments with misconfigured NFS mounts
-   (#13945)
-
- * GHC again supports production of position-independent executables
-   (#13702)
-
- * Better error messages around kind mismatches (#11198, #12373, #13530,
-   #13610)
-
-A thorough list of the changes in the release can be found in the release
-notes,
-
-    https://haskell.org/ghc/docs/8.2.2/html/users_guide/8.2.2-notes.html
-
-
-How to get it
-~~~~~~~~~~~~~
-
-This release can be downloaded from
-
-    https://www.haskell.org/ghc/download_ghc_8_2_2.html
-
-For older versions see
-
-    https://www.haskell.org/ghc/
-
-We supply binary builds in the native package format for many platforms, and the
-source distribution is available from the same place.
-
-
-Background
-~~~~~~~~~~
-
-Haskell is a standardized lazy functional programming language.
-
-GHC is a state-of-the-art programming suite for Haskell. Included is an
-optimising compiler generating efficient code for a variety of platforms,
-together with an interactive system for convenient, quick development. The
-distribution includes space and time profiling facilities, a large collection of
-libraries, and support for various language extensions, including concurrency,
-exceptions, and foreign language interfaces. GHC is distributed under a
-BSD-style open source license.
-
-A wide variety of Haskell related resources (tutorials, libraries,
-specifications, documentation, compilers, interpreters, references, contact
-information, links to research groups) are available from the Haskell home page
-(see below).
-
-
-On-line GHC-related resources
-~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-
-Relevant URLs:
-
-GHC home page              https://www.haskell.org/ghc/
-GHC developers' home page  https://gitlab.haskell.org/ghc/ghc/wikis/
-Haskell home page          https://www.haskell.org/
-
-
-Supported Platforms
-~~~~~~~~~~~~~~~~~~~
-
-The list of platforms we support, and the people responsible for them, is here:
-
-    https://gitlab.haskell.org/ghc/ghc/wikis/team-ghc
-
-Ports to other platforms are possible with varying degrees of difficulty. The
-Building Guide describes how to go about porting to a new platform:
-
-    https://gitlab.haskell.org/ghc/ghc/wikis/building
-
-
-Developers
-~~~~~~~~~~
-
-We welcome new contributors. Instructions on accessing our source code
-repository, and getting started with hacking on GHC, are available from the
-GHC's developer's site:
-
-    https://gitlab.haskell.org/ghc/ghc/wikis/
-
-
-Mailing lists
-~~~~~~~~~~~~~
-
-We run mailing lists for GHC users and bug reports; to subscribe, use the web
-interfaces at
-
-    https://mail.haskell.org/cgi-bin/mailman/listinfo/glasgow-haskell-users
-    https://mail.haskell.org/cgi-bin/mailman/listinfo/ghc-tickets
-
-There are several other haskell and ghc-related mailing lists on
-www.haskell.org; for the full list, see
-
-    https://mail.haskell.org/cgi-bin/mailman/listinfo
-
-Many GHC developers hang out on #haskell on IRC:
-
-    https://www.haskell.org/haskellwiki/IRC_channel
-
-Please report bugs using our bug tracking system. Instructions on reporting bugs
-can be found here:
-
-    https://www.haskell.org/ghc/reportabug
-


=====================================
compiler/ghc.mk
=====================================
@@ -106,8 +106,6 @@ ifeq "$(GhcRtsWithLibdw)" "YES"
 else
 	@echo 'cGhcRtsWithLibdw      = False'                               >> $@
 endif
-	@echo 'cGhcEnableTablesNextToCode :: String'                        >> $@
-	@echo 'cGhcEnableTablesNextToCode = "$(GhcEnableTablesNextToCode)"' >> $@
 	@echo 'cLeadingUnderscore    :: String'                             >> $@
 	@echo 'cLeadingUnderscore    = "$(LeadingUnderscore)"'              >> $@
 	@echo 'cLibFFI               :: Bool'                               >> $@


=====================================
compiler/main/DriverPipeline.hs
=====================================
@@ -258,16 +258,23 @@ compileOne' m_tc_result mHscMessage
                   then gopt_set dflags0 Opt_BuildDynamicToo
                   else dflags0
 
+       -- #16331 - when no "internal interpreter" is available but we
+       -- need to process some TemplateHaskell or QuasiQuotes, we automatically
+       -- turn on -fexternal-interpreter.
+       dflags2 = if not internalInterpreter && needsLinker
+                 then gopt_set dflags1 Opt_ExternalInterpreter
+                 else dflags1
+
        basename = dropExtension input_fn
 
        -- We add the directory in which the .hs files resides) to the import
        -- path.  This is needed when we try to compile the .hc file later, if it
        -- imports a _stub.h file that we created here.
        current_dir = takeDirectory basename
-       old_paths   = includePaths dflags1
+       old_paths   = includePaths dflags2
        !prevailing_dflags = hsc_dflags hsc_env0
        dflags =
-          dflags1 { includePaths = addQuoteInclude old_paths [current_dir]
+          dflags2 { includePaths = addQuoteInclude old_paths [current_dir]
                   , log_action = log_action prevailing_dflags }
                   -- use the prevailing log_action / log_finaliser,
                   -- not the one cached in the summary.  This is so


=====================================
compiler/main/DynFlags.hs
=====================================
@@ -1353,7 +1353,10 @@ data Settings = Settings {
   sOpt_lcc               :: [String], -- LLVM: c compiler
   sOpt_i                 :: [String], -- iserv options
 
-  sPlatformConstants     :: PlatformConstants
+  sPlatformConstants     :: PlatformConstants,
+
+  -- Formerly Config.hs, target specific
+  sTablesNextToCode :: Bool
  }
 
 targetPlatform :: DynFlags -> Platform
@@ -1621,17 +1624,14 @@ defaultObjectTarget platform
   | cGhcWithNativeCodeGen == "YES"      =  HscAsm
   | otherwise                           =  HscLlvm
 
-tablesNextToCode :: DynFlags -> Bool
-tablesNextToCode dflags
-    = mkTablesNextToCode (platformUnregisterised (targetPlatform dflags))
-
 -- Determines whether we will be compiling
 -- info tables that reside just before the entry code, or with an
 -- indirection to the entry code.  See TABLES_NEXT_TO_CODE in
 -- includes/rts/storage/InfoTables.h.
-mkTablesNextToCode :: Bool -> Bool
-mkTablesNextToCode unregisterised
-    = not unregisterised && cGhcEnableTablesNextToCode == "YES"
+tablesNextToCode :: DynFlags -> Bool
+tablesNextToCode dflags =
+    not (platformUnregisterised $ targetPlatform dflags) &&
+    sTablesNextToCode (settings dflags)
 
 data DynLibLoader
   = Deployable
@@ -5621,7 +5621,7 @@ compilerInfo dflags
        ("Object splitting supported",  showBool False),
        ("Have native code generator",  cGhcWithNativeCodeGen),
        ("Support SMP",                 cGhcWithSMP),
-       ("Tables next to code",         cGhcEnableTablesNextToCode),
+       ("Tables next to code",         showBool $ sTablesNextToCode $ settings dflags),
        ("RTS ways",                    cGhcRTSWays),
        ("RTS expects libdw",           showBool cGhcRtsWithLibdw),
        -- Whether or not we support @-dynamic-too@


=====================================
compiler/main/SysTools.hs
=====================================
@@ -184,6 +184,7 @@ initSysTools top_dir
        targetHasGnuNonexecStack <- readSetting "target has GNU nonexec stack"
        targetHasIdentDirective <- readSetting "target has .ident directive"
        targetHasSubsectionsViaSymbols <- readSetting "target has subsections via symbols"
+       tablesNextToCode <- getBooleanSetting "Tables next to code"
        myExtraGccViaCFlags <- getSetting "GCC extra via C opts"
        -- On Windows, mingw is distributed with GHC,
        -- so we look in TopDir/../mingw/bin,
@@ -303,7 +304,8 @@ initSysTools top_dir
                     sOpt_lo      = [],
                     sOpt_lc      = [],
                     sOpt_i       = [],
-                    sPlatformConstants = platformConstants
+                    sPlatformConstants = platformConstants,
+                    sTablesNextToCode = tablesNextToCode
              }
 
 


=====================================
hadrian/src/Rules/Generate.hs
=====================================
@@ -303,6 +303,8 @@ generateSettings = do
         , ("LLVM llc command", settingsFileSetting SettingsFileSetting_LlcCommand)
         , ("LLVM opt command", settingsFileSetting SettingsFileSetting_OptCommand)
         , ("LLVM clang command", settingsFileSetting SettingsFileSetting_ClangCommand)
+
+        , ("Tables next to code", yesNo <$> ghcEnableTablesNextToCode)
         ]
     let showTuple (k, v) = "(" ++ show k ++ ", " ++ show v ++ ")"
     pure $ case settings of
@@ -334,7 +336,6 @@ generateConfigHs = do
     cGhcWithInterpreter        <- expr $ yesNo <$> ghcWithInterpreter
     cGhcWithNativeCodeGen      <- expr $ yesNo <$> ghcWithNativeCodeGen
     cGhcWithSMP                <- expr $ yesNo <$> ghcWithSMP
-    cGhcEnableTablesNextToCode <- expr $ yesNo <$> ghcEnableTablesNextToCode
     cLeadingUnderscore         <- expr $ yesNo <$> flag LeadingUnderscore
     cLibFFI                    <- expr useLibFFIForAdjustors
     rtsWays                    <- getRtsWays
@@ -389,8 +390,6 @@ generateConfigHs = do
         , "cGhcWithSMP           = " ++ show cGhcWithSMP
         , "cGhcRTSWays           :: String"
         , "cGhcRTSWays           = " ++ show cGhcRTSWays
-        , "cGhcEnableTablesNextToCode :: String"
-        , "cGhcEnableTablesNextToCode = " ++ show cGhcEnableTablesNextToCode
         , "cLeadingUnderscore    :: String"
         , "cLeadingUnderscore    = " ++ show cLeadingUnderscore
         , "cLibFFI               :: Bool"


=====================================
hadrian/src/Rules/Test.hs
=====================================
@@ -107,6 +107,9 @@ testRules = do
         --       Shake can keep track of them, but it is not as easy as it seems
         --       to get that to work.
         liftIO $ do
+            -- Many of those env vars are used by Makefiles in the
+            -- test infrastructure, or from tests or their
+            -- Makefiles.
             setEnv "MAKE" makePath
             setEnv "PYTHON" pythonPath
             setEnv "TEST_HC" ghcPath
@@ -116,6 +119,11 @@ testRules = do
             setEnv "CHECK_API_ANNOTATIONS"
                    (top -/- root -/- checkApiAnnotationsProgPath)
 
+            -- This lets us bypass the need to generate a config
+            -- through Make, which happens in testsuite/mk/boilerplate.mk
+            -- which is in turn included by all test 'Makefile's.
+            setEnv "ghc-config-mk" (top -/- root -/- ghcConfigPath)
+
         -- Execute the test target.
         -- We override the verbosity setting to make sure the user can see
         -- the test output: https://gitlab.haskell.org/ghc/ghc/issues/15951.


=====================================
includes/ghc.mk
=====================================
@@ -210,6 +210,7 @@ $(includes_SETTINGS) : includes/Makefile | $$(dir $$@)/.
 	@echo ',("LLVM llc command", "$(SettingsLlcCommand)")' >> $@
 	@echo ',("LLVM opt command", "$(SettingsOptCommand)")' >> $@
 	@echo ',("LLVM clang command", "$(SettingsClangCommand)")' >> $@
+	@echo ',("Tables next to code", "$(GhcEnableTablesNextToCode)")' >> $@
 	@echo ']' >> $@
 
 


=====================================
testsuite/mk/boilerplate.mk
=====================================
@@ -240,11 +240,13 @@ $(TOP)/mk/ghc-config : $(TOP)/mk/ghc-config.hs
 
 empty=
 space=$(empty) $(empty)
+ifeq "$(ghc-config-mk)" ""
 ghc-config-mk = $(TOP)/mk/ghcconfig$(subst $(space),_,$(subst :,_,$(subst /,_,$(subst \,_,$(TEST_HC))))).mk
 
 $(ghc-config-mk) : $(TOP)/mk/ghc-config
 	$(TOP)/mk/ghc-config "$(TEST_HC)" >"$@"; if [ $$? != 0 ]; then $(RM) "$@"; exit 1; fi
 # If the ghc-config fails, remove $@, and fail
+endif
 
 # Note: $(CLEANING) is not defined in the testsuite.
 ifeq "$(findstring clean,$(MAKECMDGOALS))" ""



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/82ae68a9af9381a89228bd84f3e7f7c7760547b5...dc2eb364dec794e218ea6d79de9b40a0ede9a1ae

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/compare/82ae68a9af9381a89228bd84f3e7f7c7760547b5...dc2eb364dec794e218ea6d79de9b40a0ede9a1ae
You're receiving this email because of your account on gitlab.haskell.org.


-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/ghc-commits/attachments/20190507/49419ee9/attachment-0001.html>


More information about the ghc-commits mailing list