[Git][ghc/ghc][wip/T26819] 4 commits: ci: remove duplicate keys in .gitlab-ci.yml
Peter Trommler pushed to branch wip/T26819 at Glasgow Haskell Compiler / GHC Commits: 414b9593 by Cheng Shao at 2026-01-24T07:11:51-05:00 ci: remove duplicate keys in .gitlab-ci.yml This patch removes accidentally duplicate keys in `.gitlab-ci.yml`. The YAML spec doesn't allow duplicate keys in the first place, and according to GitLab docs (https://docs.gitlab.com/ci/yaml/yaml_optimization/#anchors), the latest key overrides the earlier entries. - - - - - e5cb5491 by Cheng Shao at 2026-01-24T07:12:34-05:00 hadrian: drop obsolete configure/make builder logic for libffi This patch drops obsolete hadrian logic around `Configure libffiPath`/`Make libffiPath` builders, they are no longer needed after libffi-clib has landed. Closes #26815. - - - - - 2d160222 by Simon Hengel at 2026-01-24T07:13:17-05:00 Fix typo in roles.rst - - - - - 811f56e5 by Peter Trommler at 2026-01-24T17:41:50+01:00 hadrian: Fix dependency generation for assembler Assembler files allow # for comments unless in column 1. A modern cpp for C treats those a preprocessor directives. We tell gcc that a .S file is assembler with cpp and not C. Fixes #26819 - - - - - 8 changed files: - .gitlab-ci.yml - docs/users_guide/exts/roles.rst - hadrian/src/Builder.hs - hadrian/src/Context.hs - hadrian/src/Rules/Compile.hs - hadrian/src/Settings/Builders/Cc.hs - hadrian/src/Settings/Builders/Configure.hs - hadrian/src/Settings/Builders/Make.hs Changes: ===================================== .gitlab-ci.yml ===================================== @@ -1050,10 +1050,6 @@ abi-test: optional: true dependencies: null image: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora43:$DOCKER_REV" - rules: - - if: $CI_MERGE_REQUEST_ID - - if: '$CI_COMMIT_BRANCH == "master"' - - if: '$CI_COMMIT_BRANCH =~ /ghc-[0.9]+\.[0-9]+/' tags: - x86_64-linux script: ===================================== docs/users_guide/exts/roles.rst ===================================== @@ -38,7 +38,7 @@ trouble. The way to identify such situations is to have *roles* assigned to type variables of datatypes, classes, and type synonyms. -Roles as implemented in GHC are a from a simplified version of the work +Roles as implemented in GHC are based on a simplified version of the work described in `Generative type abstraction and type-level computation <https://www.seas.upenn.edu/~sweirich/papers/popl163af-weirich.pdf>`__, published at POPL 2011. ===================================== hadrian/src/Builder.hs ===================================== @@ -49,7 +49,7 @@ import GHC.Toolchain.Program -- * Compile or preprocess a source file. -- * Extract source dependencies by passing @-MM@ command line argument. data CcMode = CompileC | FindCDependencies DependencyType deriving (Eq, Generic, Show) -data DependencyType = CDep | CxxDep deriving (Eq, Generic, Show) +data DependencyType = CDep | CxxDep | AsmDep deriving (Eq, Generic, Show) instance Binary CcMode instance Hashable CcMode ===================================== hadrian/src/Context.hs ===================================== @@ -11,7 +11,7 @@ module Context ( pkgLibraryFile, pkgConfFile, pkgStampFile, resourcePath, objectPath, contextPath, getContextPath, libPath, distDir, distDynDir, - haddockStatsFilesDir, ensureConfigured, autogenPath, rtsContext, rtsBuildPath, libffiBuildPath + haddockStatsFilesDir, ensureConfigured, autogenPath, rtsContext, rtsBuildPath ) where import Base @@ -93,14 +93,6 @@ rtsContext stage = vanillaContext stage rts rtsBuildPath :: Stage -> Action FilePath rtsBuildPath stage = buildPath (rtsContext stage) --- | Build directory for in-tree 'libffi' library. -libffiBuildPath :: Stage -> Action FilePath -libffiBuildPath stage = buildPath $ Context - stage - libffi - (error "libffiBuildPath: way not set.") - (error "libffiBuildPath: inplace not set.") - pkgFileName :: Context -> Package -> String -> String -> Action FilePath pkgFileName context package prefix suffix = do pid <- pkgUnitId (stage context) package ===================================== hadrian/src/Rules/Compile.hs ===================================== @@ -282,8 +282,11 @@ needDependencies lang context@Context {..} src depFile = do discover -- Continue the discovery process -- We need to pass different flags to cc depending on whether the - -- file to compile is a .c or a .cpp file - depType = if lang == Cxx then CxxDep else CDep + -- file to compile is a .c or a .cpp or a .S file + depType = case lang of + Cxx -> CxxDep + Asm -> AsmDep + _ -> CDep parseFile :: FilePath -> Action [String] parseFile file = do ===================================== hadrian/src/Settings/Builders/Cc.hs ===================================== @@ -18,6 +18,7 @@ ccBuilderArgs = do , arg "-o", arg =<< getOutput ] , builder (Cc (FindCDependencies CDep)) ? findCDepExpr CDep , builder (Cc (FindCDependencies CxxDep)) ? findCDepExpr CxxDep + , builder (Cc (FindCDependencies AsmDep)) ? findCDepExpr AsmDep ] where findCDepExpr depType = do @@ -26,10 +27,10 @@ ccBuilderArgs = do , arg "-MM", arg "-MG" , arg "-MF", arg output , arg "-MT", arg $ dropExtension output -<.> "o" - , case depType of CDep -> mempty; CxxDep -> arg "-std=c++11" + , case depType of CDep -> mempty; CxxDep -> arg "-std=c++11"; AsmDep -> mempty , cIncludeArgs - , arg "-x", arg (case depType of CDep -> "c"; CxxDep -> "c++") - , case depType of CDep -> mempty; CxxDep -> getContextData cxxOpts + , arg "-x", arg (case depType of CDep -> "c"; CxxDep -> "c++"; AsmDep -> "assembler-with-cpp") + , case depType of CDep -> mempty; CxxDep -> getContextData cxxOpts; AsmDep -> mempty -- Pass 'ghcversion.h' to give sources access to the -- `MIN_VERSION_GLASGOW_HASKELL` macro. , notStage0 ? arg "-include" <> arg "rts/include/ghcversion.h" ===================================== hadrian/src/Settings/Builders/Configure.hs ===================================== @@ -8,8 +8,7 @@ configureBuilderArgs :: Args configureBuilderArgs = do stage <- getStage gmpPath <- expr (gmpBuildPath stage) - libffiPath <- expr (libffiBuildPath stage) - mconcat [ builder (Configure gmpPath) ? do + builder (Configure gmpPath) ? do targetArch <- queryTarget queryArch targetPlatform <- queryTarget targetPlatformTriple buildPlatform <- queryBuild targetPlatformTriple @@ -28,16 +27,3 @@ configureBuilderArgs = do -- option. <> [ "--enable-alloca=malloc-notreentrant" | targetArch == "wasm32" ] <> [ "--with-pic=yes" ] - - , builder (Configure libffiPath) ? do - top <- expr topDirectory - targetPlatform <- queryTarget targetPlatformTriple - way <- getWay - pure [ "--prefix=" ++ top -/- libffiPath -/- "inst" - , "--libdir=" ++ top -/- libffiPath -/- "inst/lib" - , "--enable-static=yes" - , "--enable-shared=" - ++ (if wayUnit Dynamic way - then "yes" - else "no") - , "--host=" ++ targetPlatform ] ] ===================================== hadrian/src/Settings/Builders/Make.hs ===================================== @@ -12,12 +12,8 @@ makeBuilderArgs = do threads <- shakeThreads <$> expr getShakeOptions stage <- getStage gmpPath <- expr (gmpBuildPath stage) - libffiPaths <- forM [Stage1, Stage2, Stage3 ] $ \s -> expr (libffiBuildPath s) let t = show $ max 4 (threads - 2) -- Don't use all Shake's threads - mconcat $ - (builder (Make gmpPath ) ? pure ["MAKEFLAGS=-j" ++ t]) : - [ builder (Make libffiPath) ? pure ["MAKEFLAGS=-j" ++ t, "install"] - | libffiPath <- libffiPaths ] + builder (Make gmpPath) ? pure ["MAKEFLAGS=-j" ++ t] validateBuilderArgs :: Args validateBuilderArgs = builder (Make "testsuite/tests") ? do View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dcdaff81fc31032763ad87bf9701a3c... -- View it on GitLab: https://gitlab.haskell.org/ghc/ghc/-/compare/dcdaff81fc31032763ad87bf9701a3c... You're receiving this email because of your account on gitlab.haskell.org.
participants (1)
-
Peter Trommler (@trommler)