[Git][ghc/ghc][wip/toolchain-selection] Address review
Rodrigo Mesquita (@alt-romes)
gitlab at gitlab.haskell.org
Mon Jul 17 18:36:59 UTC 2023
Rodrigo Mesquita pushed to branch wip/toolchain-selection at Glasgow Haskell Compiler / GHC
Commits:
c1915aec by Rodrigo Mesquita at 2023-07-17T19:36:49+01:00
Address review
- - - - -
3 changed files:
- − TODO
- hadrian/src/Rules/BinaryDist.hs
- utils/ghc-toolchain/src/GHC/Toolchain/Target.hs
Changes:
=====================================
TODO deleted
=====================================
@@ -1,9 +0,0 @@
-Things that might get done on this or another MR
-[ ] Guarantee flags passed to configure are eventually passed to ghc-toolchain (like CFLAGS=...) explicitly specified
-[ ] Drop SettingsXXXX altogether, now we just have the toolchain (well, this goes with deleting a good part of configure)
-[x] Readelf is only used to find cc link, that OK?
-[-] In hadrian/src/Rules/Generate.hs, generateGhcPlatformH, factor out the query into an argument to chooseSetting, to deduplicate it
-[ ] Get rid of all the ToolchainSettings in Hadrian still (e.g. settings-clang-command)
-[ ] Write Note about dummy values in default.host.target
-[x] Don't put default.*.targets on the root folder.
-[x] The $$tooldir substitution didn't seem to be working when issued by hadrian.
=====================================
hadrian/src/Rules/BinaryDist.hs
=====================================
@@ -216,7 +216,6 @@ bindistRules = do
-- looking for the settings files.
unless windowsHost $
removeFile (bindistFilesDir -/- "lib" -/- "settings")
- removeFile (bindistFilesDir -/- "lib" -/- "settings")
unless cross $ need ["docs"]
=====================================
utils/ghc-toolchain/src/GHC/Toolchain/Target.hs
=====================================
@@ -22,22 +22,20 @@ data WordSize = WS4 | WS8
data Endianness = LittleEndian | BigEndian
deriving (Show, Read, Eq, Ord)
--- ROMES:TODO: A target might also need
--- * Llc command
--- * Opt command
--- * DistroMinGW? -- no, this should be configured with existing flags to point to the bindist mingw
--- * Install_name_tool
--- * Touch cmd
+-- TODO(#23674): Move the remaining relevant `settings-xxx` to Target:
+-- * llc command
+-- * opt command
+-- * install_name_tool
-- * otool command
--
--- Which are things that are put in GHC's settings, which might be different across targets
+-- Those are all things that are put into GHC's settings, and that might be
+-- different across targets
-- | A 'Target' consists of:
--
-- * a target architecture and operating system
-- * various bits of information about the platform
-- * various toolchain components targetting that platform
---
data Target = Target
{ -- Platform
tgtArchOs :: ArchOS
@@ -54,8 +52,9 @@ data Target = Target
-- GHC capabilities
, tgtUnregisterised :: Bool
, tgtTablesNextToCode :: Bool
- -- , tgtHasThreadedRts :: Bool -- Do we need this for each target? Or just when bootstrapping?
- , tgtUseLibffiForAdjustors :: Bool -- We need to know whether or not to include libffi headers, and generate additional code for it
+ -- , tgtHasThreadedRts :: Bool -- We likely just need this when bootstrapping
+ , tgtUseLibffiForAdjustors :: Bool
+ -- ^ We need to know whether or not to include libffi headers, and generate additional code for it
-- C toolchain
, tgtCCompiler :: Cc
@@ -64,9 +63,11 @@ data Target = Target
, tgtHsCPreprocessor :: HsCpp
, tgtCCompilerLink :: CcLink
, tgtAr :: Ar
- , tgtRanlib :: Maybe Ranlib -- ^ N.B. Most @ar@ implementations will add an index by default without @ranlib@ so this is often optional
+ , tgtRanlib :: Maybe Ranlib
+ -- ^ N.B. Most @ar@ implementations will add an index by default without @ranlib@ so this is often optional
, tgtNm :: Nm
- , tgtMergeObjs :: Maybe MergeObjs -- We don't need a merge objects tool if we @Ar@ supports @-L@
+ , tgtMergeObjs :: Maybe MergeObjs
+ -- ^ We don't need a merge objects tool if we @Ar@ supports @-L@
-- Windows-specific tools
, tgtWindres :: Maybe Program
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c1915aec7579eceee293e5b35dd7896bda982373
--
View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/commit/c1915aec7579eceee293e5b35dd7896bda982373
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/20230717/b828cb8a/attachment-0001.html>
More information about the ghc-commits
mailing list