Skip to content
Snippets Groups Projects
Commit c1915aec authored by Rodrigo Mesquita's avatar Rodrigo Mesquita :seedling:
Browse files

Address review

parent 0261da57
No related branches found
No related tags found
No related merge requests found
Pipeline #81468 canceled
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.
......@@ -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"]
......
......@@ -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
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment