[Git][ghc/ghc][wip/angerman/fix-hadrian-cross-macos] add docs

Moritz Angermann gitlab at gitlab.haskell.org
Sat Jun 20 06:31:59 UTC 2020



Moritz Angermann pushed to branch wip/angerman/fix-hadrian-cross-macos at Glasgow Haskell Compiler / GHC


Commits:
41f9ae95 by Moritz Angermann at 2020-06-20T11:38:59+08:00
add docs

- - - - -


1 changed file:

- hadrian/src/Oracles/Flag.hs


Changes:

=====================================
hadrian/src/Oracles/Flag.hs
=====================================
@@ -12,6 +12,18 @@ import Base
 import Context
 import Oracles.Setting
 
+-- Flags can be either staged or not.  Global flags are assumed to be identical
+-- across all stages.  While staged flags are specific to a given stage.  Flags
+-- are read from the @cfg/system.config@ (the result of configure processing
+-- @cfg/system.config.in@).  See @flag@ below for the actual FlagName to lookup
+-- key mapping.  If staged flags can not be found, they fall back to the Global
+-- flag.  Thus we can special case only single stages while falling back to the
+-- global value.
+--
+-- Example: When cross compiling the Stage0 (bootstrap) @ar@ might be bsd ar and
+-- thus not support \@ response files.  However the the Stage1+ toolchain might.
+-- Therefore we must special case @ArSupportsAtFile@ for stage0 to be NO, while
+-- it can be YES for stage1+.
 data FlagName = ArSupportsAtFile
               | CrossCompiling
               | CcLlvmBackend
@@ -27,6 +39,9 @@ data FlagName = ArSupportsAtFile
               | UseSystemFfi
               | BootstrapThreadedRts
 
+-- Use Global if you are certain the flag is global across all stages (or there
+-- simply is no stage/context available).  Use of Staged is preferred as it
+-- provides more precise information about the use of the Flag.
 data Flag = Global FlagName
           | Staged Stage FlagName
 



View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/41f9ae95b785bc57c6d104700cf2a407800e148b

-- 
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/41f9ae95b785bc57c6d104700cf2a407800e148b
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/20200620/8016b8c3/attachment-0001.html>


More information about the ghc-commits mailing list