Skip to content
Snippets Groups Projects

Compare revisions

Changes are shown as if the source revision was being merged into the target revision. Learn more about comparing revisions.

Source

Select target project
No results found

Target

Select target project
  • ghc/ghc
  • bgamari/ghc
  • syd/ghc
  • ggreif/ghc
  • watashi/ghc
  • RolandSenn/ghc
  • mpickering/ghc
  • DavidEichmann/ghc
  • carter/ghc
  • harpocrates/ghc
  • ethercrow/ghc
  • mijicd/ghc
  • adamse/ghc
  • alexbiehl/ghc
  • gridaphobe/ghc
  • trofi/ghc
  • supersven/ghc
  • ppk/ghc
  • ulysses4ever/ghc
  • AndreasK/ghc
  • ghuntley/ghc
  • shayne-fletcher-da/ghc
  • fgaz/ghc
  • yav/ghc
  • osa1/ghc
  • mbbx6spp/ghc
  • JulianLeviston/ghc
  • reactormonk/ghc
  • rae/ghc
  • takenobu-hs/ghc
  • michalt/ghc
  • andrewthad/ghc
  • hsyl20/ghc
  • scottgw/ghc
  • sjakobi/ghc
  • angerman/ghc
  • RyanGlScott/ghc
  • hvr/ghc
  • howtonotwin/ghc
  • chessai/ghc
  • m-renaud/ghc
  • brprice/ghc
  • stevehartdata/ghc
  • sighingnow/ghc
  • kgardas/ghc
  • ckoparkar/ghc
  • alp/ghc
  • smaeul/ghc
  • kakkun61/ghc
  • sykloid/ghc
  • newhoggy/ghc
  • toonn/ghc
  • nineonine/ghc
  • Phyx/ghc
  • ezyang/ghc
  • tweag/ghc
  • langston/ghc
  • ndmitchell/ghc
  • rockbmb/ghc
  • artempyanykh/ghc
  • mniip/ghc
  • mynguyenbmc/ghc
  • alexfmpe/ghc
  • crockeea/ghc
  • nh2/ghc
  • vaibhavsagar/ghc
  • phadej/ghc
  • Haskell-mouse/ghc
  • lolotp/ghc
  • spacekitteh/ghc
  • michaelpj/ghc
  • mgsloan/ghc
  • HPCohen/ghc
  • tmobile/ghc
  • radrow/ghc
  • simonmar/ghc
  • _deepfire/ghc
  • Ericson2314/ghc
  • leitao/ghc
  • fumieval/ghc
  • trac-isovector/ghc
  • cblp/ghc
  • xich/ghc
  • ciil/ghc
  • erthalion/ghc
  • xldenis/ghc
  • autotaker/ghc
  • haskell-wasm/ghc
  • kcsongor/ghc
  • agander/ghc
  • Baranowski/ghc
  • trac-dredozubov/ghc
  • 23Skidoo/ghc
  • iustin/ghc
  • ningning/ghc
  • josefs/ghc
  • kabuhr/ghc
  • gallais/ghc
  • dten/ghc
  • expipiplus1/ghc
  • Pluralia/ghc
  • rohanjr/ghc
  • intricate/ghc
  • kirelagin/ghc
  • Javran/ghc
  • DanielG/ghc
  • trac-mizunashi_mana/ghc
  • pparkkin/ghc
  • bollu/ghc
  • ntc2/ghc
  • jaspervdj/ghc
  • JoshMeredith/ghc
  • wz1000/ghc
  • zkourouma/ghc
  • code5hot/ghc
  • jdprice/ghc
  • tdammers/ghc
  • J-mie6/ghc
  • trac-lantti/ghc
  • ch1bo/ghc
  • cgohla/ghc
  • lucamolteni/ghc
  • acairncross/ghc
  • amerocu/ghc
  • chreekat/ghc
  • txsmith/ghc
  • trupill/ghc
  • typetetris/ghc
  • sergv/ghc
  • fryguybob/ghc
  • erikd/ghc
  • trac-roland/ghc
  • setupminimal/ghc
  • Friede80/ghc
  • SkyWriter/ghc
  • xplorld/ghc
  • abrar/ghc
  • obsidiansystems/ghc
  • Icelandjack/ghc
  • adinapoli/ghc
  • trac-matthewbauer/ghc
  • heatsink/ghc
  • dwijnand/ghc
  • Cmdv/ghc
  • alinab/ghc
  • pepeiborra/ghc
  • fommil/ghc
  • luochen1990/ghc
  • rlupton20/ghc
  • applePrincess/ghc
  • lehins/ghc
  • ronmrdechai/ghc
  • leeadam/ghc
  • harendra/ghc
  • mightymosquito1991/ghc
  • trac-gershomb/ghc
  • lucajulian/ghc
  • Rizary/ghc
  • VictorCMiraldo/ghc
  • jamesbrock/ghc
  • andrewdmeier/ghc
  • luke/ghc
  • pranaysashank/ghc
  • cocreature/ghc
  • hithroc/ghc
  • obreitwi/ghc
  • slrtbtfs/ghc
  • kaol/ghc
  • yairchu/ghc
  • Mathemagician98/ghc
  • trac-taylorfausak/ghc
  • leungbk/ghc
  • MichaWiedenmann/ghc
  • chris-martin/ghc
  • TDecki/ghc
  • adithyaov/ghc
  • trac-gelisam/ghc
  • Lysxia/ghc
  • complyue/ghc
  • bwignall/ghc
  • sternmull/ghc
  • sonika/ghc
  • leif/ghc
  • broadwaylamb/ghc
  • myszon/ghc
  • danbroooks/ghc
  • Mechachleopteryx/ghc
  • zardyh/ghc
  • trac-vdukhovni/ghc
  • OmarKhaledAbdo/ghc
  • arrowd/ghc
  • Bodigrim/ghc
  • matheus23/ghc
  • cardenaso11/ghc
  • trac-Athas/ghc
  • mb720/ghc
  • DylanZA/ghc
  • liff/ghc
  • typedrat/ghc
  • trac-claude/ghc
  • jbm/ghc
  • Gertjan423/ghc
  • PHO/ghc
  • JKTKops/ghc
  • kockahonza/ghc
  • msakai/ghc
  • Sir4ur0n/ghc
  • barambani/ghc
  • vishnu.c/ghc
  • dcoutts/ghc
  • trac-runeks/ghc
  • trac-MaxGabriel/ghc
  • lexi.lambda/ghc
  • strake/ghc
  • spavikevik/ghc
  • JakobBruenker/ghc
  • rmanne/ghc
  • gdziadkiewicz/ghc
  • ani/ghc
  • iliastsi/ghc
  • smunix/ghc
  • judah/ghc
  • blackgnezdo/ghc
  • emilypi/ghc
  • trac-bpfoley/ghc
  • muesli4/ghc
  • trac-gkaracha/ghc
  • Kleidukos/ghc
  • nek0/ghc
  • TristanCacqueray/ghc
  • dwulive/ghc
  • mbakke/ghc
  • arybczak/ghc
  • Yang123321/ghc
  • maksbotan/ghc
  • QuietMisdreavus/ghc
  • trac-olshanskydr/ghc
  • emekoi/ghc
  • samuela/ghc
  • josephcsible/ghc
  • dramforever/ghc
  • lpsmith/ghc
  • DenisFrezzato/ghc
  • michivi/ghc
  • jneira/ghc
  • jeffhappily/ghc
  • Ivan-Yudin/ghc
  • nakaji-dayo/ghc
  • gdevanla/ghc
  • galen/ghc
  • fendor/ghc
  • yaitskov/ghc
  • rcythr/ghc
  • awpr/ghc
  • jeremyschlatter/ghc
  • Aver1y/ghc
  • mitchellvitez/ghc
  • merijn/ghc
  • tomjaguarpaw1/ghc
  • trac-NoidedSuper/ghc
  • erewok/ghc
  • trac-junji.hashimoto/ghc
  • adamwespiser/ghc
  • bjaress/ghc
  • jhrcek/ghc
  • leonschoorl/ghc
  • lukasz-golebiewski/ghc
  • sheaf/ghc
  • last-g/ghc
  • carassius1014/ghc
  • eschwartz/ghc
  • dwincort/ghc
  • felixwiemuth/ghc
  • TimWSpence/ghc
  • marcusmonteirodesouza/ghc
  • WJWH/ghc
  • vtols/ghc
  • theobat/ghc
  • BinderDavid/ghc
  • ckoparkar0/ghc
  • alexander-kjeldaas/ghc
  • dme2/ghc
  • philderbeast/ghc
  • aaronallen8455/ghc
  • rayshih/ghc
  • benkard/ghc
  • mpardalos/ghc
  • saidelman/ghc
  • leiftw/ghc
  • ca333/ghc
  • bwroga/ghc
  • nmichael44/ghc
  • trac-crobbins/ghc
  • felixonmars/ghc
  • adityagupta1089/ghc
  • hgsipiere/ghc
  • treeowl/ghc
  • alexpeits/ghc
  • CraigFe/ghc
  • dnlkrgr/ghc
  • kerckhove_ts/ghc
  • cptwunderlich/ghc
  • eiais/ghc
  • hahohihu/ghc
  • sanchayan/ghc
  • lemmih/ghc
  • sehqlr/ghc
  • trac-dbeacham/ghc
  • luite/ghc
  • trac-f-a/ghc
  • vados/ghc
  • luntain/ghc
  • fatho/ghc
  • alexbiehl-gc/ghc
  • dcbdan/ghc
  • tvh/ghc
  • liam-ly/ghc
  • timbobbarnes/ghc
  • GovanifY/ghc
  • shanth2600/ghc
  • gliboc/ghc
  • duog/ghc
  • moxonsghost/ghc
  • zander/ghc
  • masaeedu/ghc
  • georgefst/ghc
  • guibou/ghc
  • nicuveo/ghc
  • mdebruijne/ghc
  • stjordanis/ghc
  • emiflake/ghc
  • wygulmage/ghc
  • frasertweedale/ghc
  • coot/ghc
  • aratamizuki/ghc
  • tsandstr/ghc
  • mrBliss/ghc
  • Anton-Latukha/ghc
  • tadfisher/ghc
  • vapourismo/ghc
  • Sorokin-Anton/ghc
  • basile-henry/ghc
  • trac-mightybyte/ghc
  • AbsoluteNikola/ghc
  • cobrien99/ghc
  • songzh/ghc
  • blamario/ghc
  • aj4ayushjain/ghc
  • trac-utdemir/ghc
  • tangcl/ghc
  • hdgarrood/ghc
  • maerwald/ghc
  • arjun/ghc
  • ratherforky/ghc
  • haskieLambda/ghc
  • EmilGedda/ghc
  • Bogicevic/ghc
  • eddiejessup/ghc
  • kozross/ghc
  • AlistairB/ghc
  • 3Rafal/ghc
  • christiaanb/ghc
  • trac-bit/ghc
  • matsumonkie/ghc
  • trac-parsonsmatt/ghc
  • chisui/ghc
  • jaro/ghc
  • trac-kmiyazato/ghc
  • davidsd/ghc
  • Tritlo/ghc
  • I-B-3/ghc
  • lykahb/ghc
  • AriFordsham/ghc
  • turion1/ghc
  • berberman/ghc
  • christiantakle/ghc
  • zyklotomic/ghc
  • trac-ocramz/ghc
  • CSEdd/ghc
  • doyougnu/ghc
  • mmhat/ghc
  • why-not-try-calmer/ghc
  • plutotulp/ghc
  • kjekac/ghc
  • Manvi07/ghc
  • teo/ghc
  • cactus/ghc
  • CarrieMY/ghc
  • abel/ghc
  • yihming/ghc
  • tsakki/ghc
  • jessicah/ghc
  • oliverbunting/ghc
  • meld/ghc
  • friedbrice/ghc
  • Joald/ghc
  • abarbu/ghc
  • DigitalBrains1/ghc
  • sterni/ghc
  • alexDarcy/ghc
  • hexchain/ghc
  • minimario/ghc
  • zliu41/ghc
  • tommd/ghc
  • jazcarate/ghc
  • peterbecich/ghc
  • alirezaghey/ghc
  • solomon/ghc
  • mikael.urankar/ghc
  • davjam/ghc
  • int-index/ghc
  • MorrowM/ghc
  • nrnrnr/ghc
  • Sonfamm/ghc-test-only
  • afzt1/ghc
  • nguyenhaibinh-tpc/ghc
  • trac-lierdakil/ghc
  • MichaWiedenmann1/ghc
  • jmorag/ghc
  • Ziharrk/ghc
  • trac-MitchellSalad/ghc
  • juampe/ghc
  • jwaldmann/ghc
  • snowleopard/ghc
  • juhp/ghc
  • normalcoder/ghc
  • ksqsf/ghc
  • trac-jberryman/ghc
  • roberth/ghc
  • 1ntEgr8/ghc
  • epworth/ghc
  • MrAdityaAlok/ghc
  • JunmingZhao42/ghc
  • jappeace/ghc
  • trac-Gabriel439/ghc
  • alt-romes/ghc
  • HugoPeters1024/ghc
  • 10ne1/ghc-fork
  • agentultra/ghc
  • Garfield1002/ghc
  • ChickenProp/ghc
  • clyring/ghc
  • MaxHearnden/ghc
  • jumper149/ghc
  • vem/ghc
  • ketzacoatl/ghc
  • Rosuavio/ghc
  • jackohughes/ghc
  • p4l1ly/ghc
  • konsumlamm/ghc
  • shlevy/ghc
  • torsten.schmits/ghc
  • andremarianiello/ghc
  • amesgen/ghc
  • googleson78/ghc
  • InfiniteVerma/ghc
  • uhbif19/ghc
  • yiyunliu/ghc
  • raehik/ghc
  • mrkun/ghc
  • telser/ghc
  • 1Jajen1/ghc
  • slotThe/ghc
  • WinstonHartnett/ghc
  • mpilgrem/ghc
  • dreamsmasher/ghc
  • schuelermine/ghc
  • trac-Viwor/ghc
  • undergroundquizscene/ghc
  • evertedsphere/ghc
  • coltenwebb/ghc
  • oberblastmeister/ghc
  • agrue/ghc
  • lf-/ghc
  • zacwood9/ghc
  • steshaw/ghc
  • high-cloud/ghc
  • SkamDart/ghc
  • PiDelport/ghc
  • maoif/ghc
  • RossPaterson/ghc
  • CharlesTaylor7/ghc
  • ribosomerocker/ghc
  • trac-ramirez7/ghc
  • daig/ghc
  • NicolasT/ghc
  • FinleyMcIlwaine/ghc
  • lawtonnichols/ghc
  • jmtd/ghc
  • ozkutuk/ghc
  • wildsebastian/ghc
  • nikshalark/ghc
  • lrzlin/ghc
  • tobias/ghc
  • fw/ghc
  • hawkinsw/ghc
  • type-dance/ghc
  • rui314/ghc
  • ocharles/ghc
  • wavewave/ghc
  • TheKK/ghc
  • nomeata/ghc
  • trac-csabahruska/ghc
  • jonathanjameswatson/ghc
  • L-as/ghc
  • Axman6/ghc
  • barracuda156/ghc
  • trac-jship/ghc
  • jake-87/ghc
  • meooow/ghc
  • rebeccat/ghc
  • hamana55/ghc
  • Enigmage/ghc
  • kokobd/ghc
  • agevelt/ghc
  • gshen42/ghc
  • chrismwendt/ghc
  • MangoIV/ghc
  • teto/ghc
  • Sookr1/ghc
  • trac-thomasjm/ghc
  • barci2/ghc-dev
  • trac-m4dc4p/ghc
  • dixonary/ghc
  • breakerzirconia/ghc
  • alexsio27444/ghc
  • glocq/ghc
  • sourabhxyz/ghc
  • ryantrinkle/ghc
  • Jade/ghc
  • scedfaliako/ghc
  • martijnbastiaan/ghc
  • trac-george.colpitts/ghc
  • ammarbinfaisal/ghc
  • mimi.vx/ghc
  • lortabac/ghc
  • trac-zyla/ghc
  • benbellick/ghc
  • aadaa-fgtaa/ghc
  • jvanbruegge/ghc
  • archbung/ghc
  • gilmi/ghc
  • mfonism/ghc
  • alex-mckenna/ghc
  • Ei30metry/ghc
  • DiegoDiverio/ghc
  • jorgecunhamendes/ghc
  • liesnikov/ghc
  • akrmn/ghc
  • trac-simplifierticks/ghc
  • jacco/ghc
  • rhendric/ghc
  • damhiya/ghc
  • ryndubei/ghc
  • DaveBarton/ghc
  • trac-Profpatsch/ghc
  • GZGavinZhao/ghc
  • ncfavier/ghc
  • jameshaydon/ghc
  • ajccosta/ghc
  • dschrempf/ghc
  • cydparser/ghc
  • LinuxUserGD/ghc
  • elodielander/ghc
  • facundominguez/ghc
  • psilospore/ghc
  • lachrimae/ghc
  • dylan-thinnes/ghc-type-errors-plugin
  • hamishmack/ghc
  • Leary/ghc
  • lzszt/ghc
  • lyokha/ghc
  • trac-glaubitz/ghc
  • Rewbert/ghc
  • andreabedini/ghc
  • Jasagredo/ghc
  • sol/ghc
  • OlegAlexander/ghc
  • trac-sthibaul/ghc
  • avdv/ghc
  • Wendaolee/ghc
  • ur4t/ghc
  • daylily/ghc
  • boltzmannrain/ghc
  • mmzk1526/ghc
  • trac-fizzixnerd/ghc
  • soulomoon/ghc
  • rwmjones/ghc
  • j14i/ghc
  • tracsis/ghc
  • gesh/ghc
  • flip101/ghc
  • eldritch-cookie/ghc
  • LemonjamesD/ghc
  • pgujjula/ghc
  • skeuchel/ghc
  • noteed/ghc
  • gulin.serge/ghc
  • Torrekie/ghc
  • jlwoodwa/ghc
  • ayanamists/ghc
  • husong998/ghc
  • trac-edmundnoble/ghc
  • josephf/ghc
  • contrun/ghc
  • baulig/ghc
  • edsko/ghc
  • mzschr/ghc-issue-24732
  • ulidtko/ghc
  • Arsen/ghc
  • trac-sjoerd_visscher/ghc
  • crumbtoo/ghc
  • L0neGamer/ghc
  • DrewFenwick/ghc
  • benz0li/ghc
  • MaciejWas/ghc
  • jordanrule/ghc
  • trac-qqwy/ghc
  • LiamGoodacre/ghc
  • isomorpheme/ghc
  • trac-danidiaz/ghc
  • Kariim/ghc
  • MTaimoorZaeem/ghc
  • hololeap/ghc
  • ticat-fp/ghc
  • meritamen/ghc
  • criskell/ghc
  • trac-kraai/ghc
  • aergus/ghc
  • jdral/ghc
  • SamB/ghc
  • Tristian/ghc
  • ywgrit/ghc
  • KatsuPatrick/ghc
  • OsePedro/ghc
  • mpscholten/ghc
  • fp/ghc
  • zaquest/ghc
  • fangyi-zhou/ghc
  • augyg/ghc
  • rkirkman/ghc
641 results
Show changes
Commits on Source (467)
Showing
with 913 additions and 502 deletions
......@@ -2,7 +2,7 @@ variables:
GIT_SSL_NO_VERIFY: "1"
# Commit of ghc/ci-images repository from which to pull Docker images
DOCKER_REV: 243a00f06550e6b9a00fa0f1530d1bb761e8b7cc
DOCKER_REV: 653b899f026f84c8043c76c014a5355d28cda24a
# Sequential version number of all cached things.
# Bump to invalidate GitLab CI cache.
......@@ -82,11 +82,9 @@ workflow:
# which versions of GHC to allow bootstrap with
.bootstrap_matrix : &bootstrap_matrix
matrix:
- GHC_VERSION: 9.2.5
DOCKER_IMAGE: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10-ghc9_2:$DOCKER_REV"
- GHC_VERSION: 9.4.3
DOCKER_IMAGE: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10:$DOCKER_REV"
- GHC_VERSION: 9.6.1
- GHC_VERSION: 9.6.2
DOCKER_IMAGE: "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb10-ghc9_6:$DOCKER_REV"
# Allow linters to fail on draft MRs.
......@@ -396,7 +394,7 @@ hadrian-multi:
# workaround for docker permissions
- sudo chown ghc:ghc -R .
variables:
GHC_FLAGS: -Werror
GHC_FLAGS: "-Werror -Wwarn=deprecations"
CONFIGURE_ARGS: --enable-bootstrap-with-devel-snapshot
tags:
- x86_64-linux
......@@ -507,7 +505,7 @@ doc-tarball:
optional: true
- job: nightly-x86_64-windows-validate
optional: true
- job: release-x86_64-windows-release+no_split_sections
- job: release-x86_64-windows-release
optional: true
tags:
......@@ -531,7 +529,7 @@ doc-tarball:
|| mv "ghc-x86_64-linux-deb10-release.tar.xz" "$LINUX_BINDIST" \
|| true
mv "ghc-x86_64-windows-validate.tar.xz" "$WINDOWS_BINDIST" \
|| mv "ghc-x86_64-windows-release+no_split_sections.tar.xz" "$WINDOWS_BINDIST" \
|| mv "ghc-x86_64-windows-release.tar.xz" "$WINDOWS_BINDIST" \
|| true
if [ ! -f "$LINUX_BINDIST" ]; then
echo "Error: $LINUX_BINDIST does not exist. Did the Debian 9 job fail?"
......@@ -797,7 +795,12 @@ release-hackage-lint:
artifacts: false
rules:
- if: '$RELEASE_JOB == "yes"'
allow_failure: true
extends: .hackage
# The ghcup metadata pipeline requires all prior jobs to
# pass. The hackage job can easily fail due to API changes
# or similar - so we allow it to fail.
allow_failure: true
variables:
# No slow-validate bindist on release pipeline
EXTRA_HC_OPTS: "-dlint"
......@@ -1047,11 +1050,11 @@ ghcup-metadata-nightly:
artifacts: false
- job: nightly-x86_64-windows-validate
artifacts: false
- job: nightly-x86_64-linux-alpine3_12-int_native-validate+fully_static
- job: nightly-x86_64-linux-alpine3_12-validate
artifacts: false
- job: nightly-x86_64-linux-deb9-validate
artifacts: false
- job: nightly-i386-linux-deb9-validate
- job: nightly-i386-linux-deb10-validate
artifacts: false
- job: nightly-x86_64-linux-deb10-validate
artifacts: false
......@@ -1063,7 +1066,7 @@ ghcup-metadata-nightly:
artifacts: false
- job: project-version
script:
- nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%M-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml"
- nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml"
rules:
- if: $NIGHTLY
......@@ -1084,6 +1087,7 @@ ghcup-metadata-nightly-push:
- git clone https://gitlab.haskell.org/ghc/ghcup-metadata.git
- PipelineYear="$(date -d $CI_PIPELINE_CREATED_AT +%Y)"
- cp metadata_test.yaml "ghcup-metadata/ghcup-nightlies-$PipelineYear-0.0.7.yaml"
- cp metadata_test.yaml "ghcup-metadata/ghcup-nightlies-0.0.7.yaml"
- cd ghcup-metadata
- git config user.email "ghc-ci@gitlab-haskell.org"
- git config user.name "GHC GitLab CI"
......@@ -1100,7 +1104,7 @@ ghcup-metadata-release:
# No explicit needs for release pipeline as we assume we need everything and everything will pass.
extends: .ghcup-metadata
script:
- nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --release-mode --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%M-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml"
- nix shell --extra-experimental-features nix-command -f .gitlab/rel_eng -c ghcup-metadata --release-mode --metadata ghcup-0.0.7.yaml --date="$(date -d $CI_PIPELINE_CREATED_AT +%Y-%m-%d)" --pipeline-id="$CI_PIPELINE_ID" --version="$ProjectVersion" > "metadata_test.yaml"
rules:
- if: '$RELEASE_JOB == "yes"'
......@@ -1111,10 +1115,17 @@ ghcup-metadata-release:
UPSTREAM_PROJECT_ID: "$CI_PROJECT_ID"
UPSTREAM_PIPELINE_ID: "$CI_PIPELINE_ID"
RELEASE_JOB: "$RELEASE_JOB"
# Do not inherit global variables (such as CONFIGURE_ARGS) as these take
# precedence over the variables defined in the downstream job.
inherit:
variables: false
trigger:
project: "ghc/ghcup-ci"
branch: "upstream-testing"
strategy: "depend"
forward:
yaml_variables: true
pipeline_variables: false
ghcup-metadata-testing-nightly:
needs:
......
......@@ -160,6 +160,8 @@ function mingw_init() {
# We always use mingw64 Python to avoid path length issues like #17483.
export PYTHON="/mingw64/bin/python3"
# And need to use sphinx-build from the environment
export SPHINXBUILD="/mingw64/bin/sphinx-build.exe"
}
# This will contain GHC's local native toolchain
......@@ -315,7 +317,7 @@ function fetch_cabal() {
fail "neither CABAL nor CABAL_INSTALL_VERSION are not set"
fi
start_section "fetch GHC"
start_section "fetch cabal"
case "$(uname)" in
# N.B. Windows uses zip whereas all others use .tar.xz
MSYS_*|MINGW*)
......@@ -342,7 +344,7 @@ function fetch_cabal() {
mv cabal "$toolchain/bin"
;;
esac
end_section "fetch GHC"
end_section "fetch cabal"
fi
}
......@@ -575,6 +577,8 @@ function install_bindist() {
--prefix="$instdir" \
"${args[@]+"${args[@]}"}"
make_install_destdir "$TOP"/destdir "$instdir"
# And check the `--info` of the installed compiler, sometimes useful in CI log.
"$instdir"/bin/ghc --info
;;
esac
popd
......
......@@ -108,12 +108,17 @@ data Opsys
| Windows deriving (Eq)
data LinuxDistro
= Debian11 | Debian10 | Debian9
= Debian12
| Debian11
| Debian10
| Debian9
| Fedora33
| Fedora38
| Ubuntu2004
| Ubuntu1804
| Centos7
| Alpine
| Alpine312
| Alpine318
| AlpineWasm
| Rocky8
deriving (Eq)
......@@ -282,14 +287,17 @@ tags arch opsys _bc = [runnerTag arch opsys] -- Tag for which runners we can use
-- These names are used to find the docker image so they have to match what is
-- in the docker registry.
distroName :: LinuxDistro -> String
distroName Debian12 = "deb12"
distroName Debian11 = "deb11"
distroName Debian10 = "deb10"
distroName Debian9 = "deb9"
distroName Fedora33 = "fedora33"
distroName Fedora38 = "fedora38"
distroName Ubuntu1804 = "ubuntu18_04"
distroName Ubuntu2004 = "ubuntu20_04"
distroName Centos7 = "centos7"
distroName Alpine = "alpine3_12"
distroName Alpine312 = "alpine3_12"
distroName Alpine318 = "alpine3_18"
distroName AlpineWasm = "alpine3_17-wasm"
distroName Rocky8 = "rocky8"
......@@ -400,11 +408,11 @@ opsysVariables AArch64 (Darwin {}) =
, "LANG" =: "en_US.UTF-8"
, "CONFIGURE_ARGS" =: "--with-intree-gmp --with-system-libffi"
-- Fonts can't be installed on darwin
, "HADRIAN_ARGS" =: "--docs=no-sphinx"
, "HADRIAN_ARGS" =: "--docs=no-sphinx-pdfs"
]
opsysVariables Amd64 (Darwin {}) =
mconcat [ "NIX_SYSTEM" =: "x86_64-darwin"
, "MACOSX_DEPLOYMENT_TARGET" =: "10.10"
, "MACOSX_DEPLOYMENT_TARGET" =: "10.13"
-- "# Only Sierra and onwards supports clock_gettime. See #12858"
, "ac_cv_func_clock_gettime" =: "no"
-- # Only newer OS Xs support utimensat. See #17895
......@@ -414,35 +422,34 @@ opsysVariables Amd64 (Darwin {}) =
, "LANG" =: "en_US.UTF-8"
, "CONFIGURE_ARGS" =: "--with-intree-gmp --with-system-libffi"
-- Fonts can't be installed on darwin
, "HADRIAN_ARGS" =: "--docs=no-sphinx"
, "HADRIAN_ARGS" =: "--docs=no-sphinx-pdfs"
]
opsysVariables _ (Windows {}) =
mconcat [ "MSYSTEM" =: "CLANG64"
, "HADRIAN_ARGS" =: "--docs=no-sphinx"
, "HADRIAN_ARGS" =: "--docs=no-sphinx-pdfs"
, "LANG" =: "en_US.UTF-8"
, "CABAL_INSTALL_VERSION" =: "3.8.1.0"
, "GHC_VERSION" =: "9.4.3" ]
opsysVariables _ _ = mempty
distroVariables :: LinuxDistro -> Variables
distroVariables Alpine = mconcat
alpineVariables = mconcat
[ -- Due to #20266
"CONFIGURE_ARGS" =: "--disable-ld-override"
, "INSTALL_CONFIGURE_ARGS" =: "--disable-ld-override"
, "HADRIAN_ARGS" =: "--docs=no-sphinx"
-- encoding004: due to lack of locale support
-- T10458, ghcilink002: due to #17869
-- linker_unload_native: due to musl not supporting any means of probing dynlib dependencies
-- (see Note [Object unloading]).
-- linker_unload_native: due to lack of dlinfo() support
, "BROKEN_TESTS" =: "encoding004 T10458 linker_unload_native"
]
distroVariables :: LinuxDistro -> Variables
distroVariables Alpine312 = alpineVariables
distroVariables Alpine318 = alpineVariables
distroVariables Centos7 = mconcat [
"HADRIAN_ARGS" =: "--docs=no-sphinx"
]
distroVariables Rocky8 = mconcat [
"HADRIAN_ARGS" =: "--docs=no-sphinx"
"HADRIAN_ARGS" =: "--docs=no-sphinx"
, "BROKEN_TESTS" =: "T22012" -- due to #23979
]
distroVariables Fedora33 = mconcat
-- LLC/OPT do not work for some reason in our fedora images
......@@ -896,6 +903,7 @@ job_groups =
(modifyValidateJobs manual (validateBuilds Amd64 (Linux Debian10) noTntc))
, addValidateRule LLVMBackend (validateBuilds Amd64 (Linux Debian10) llvm)
, disableValidate (standardBuilds Amd64 (Linux Debian11))
, disableValidate (standardBuilds Amd64 (Linux Debian12))
-- We still build Deb9 bindists for now due to Ubuntu 18 and Linux Mint 19
-- not being at EOL until April 2023 and they still need tinfo5.
, disableValidate (standardBuildsWithConfig Amd64 (Linux Debian9) (splitSectionsBroken vanilla))
......@@ -909,19 +917,22 @@ job_groups =
-- This job is only for generating head.hackage docs
, hackage_doc_job (disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora33) releaseConfig))
, disableValidate (standardBuildsWithConfig Amd64 (Linux Fedora33) dwarf)
, fastCI (standardBuildsWithConfig Amd64 Windows (splitSectionsBroken vanilla))
, disableValidate (standardBuildsWithConfig Amd64 Windows (splitSectionsBroken nativeInt))
, disableValidate (standardBuilds Amd64 (Linux Fedora38))
, fastCI (standardBuildsWithConfig Amd64 Windows vanilla)
, disableValidate (standardBuildsWithConfig Amd64 Windows nativeInt)
, standardBuilds Amd64 Darwin
, allowFailureGroup (addValidateRule FreeBSDLabel (validateBuilds Amd64 FreeBSD13 vanilla))
, standardBuilds AArch64 Darwin
, standardBuildsWithConfig AArch64 (Linux Debian10) (splitSectionsBroken vanilla)
, disableValidate (standardBuildsWithConfig AArch64 (Linux Debian11) (splitSectionsBroken vanilla))
, disableValidate (validateBuilds AArch64 (Linux Debian10) llvm)
, standardBuildsWithConfig I386 (Linux Debian9) (splitSectionsBroken vanilla)
, standardBuildsWithConfig I386 (Linux Debian10) (splitSectionsBroken vanilla)
-- Fully static build, in theory usable on any linux distribution.
, fullyStaticBrokenTests (standardBuildsWithConfig Amd64 (Linux Alpine) (splitSectionsBroken static))
, fullyStaticBrokenTests (standardBuildsWithConfig Amd64 (Linux Alpine312) (splitSectionsBroken static))
-- Dynamically linked build, suitable for building your own static executables on alpine
, disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine) (splitSectionsBroken vanilla))
, fullyStaticBrokenTests (disableValidate (allowFailureGroup (standardBuildsWithConfig Amd64 (Linux Alpine) staticNativeInt)))
, disableValidate (standardBuildsWithConfig Amd64 (Linux Alpine312) (splitSectionsBroken vanilla))
, disableValidate (standardBuildsWithConfig AArch64 (Linux Alpine318) (splitSectionsBroken vanilla))
, fullyStaticBrokenTests (disableValidate (allowFailureGroup (standardBuildsWithConfig Amd64 (Linux Alpine312) staticNativeInt)))
, validateBuilds Amd64 (Linux Debian11) (crossConfig "aarch64-linux-gnu" (Emulator "qemu-aarch64 -L /usr/aarch64-linux-gnu") Nothing)
, validateBuilds Amd64 (Linux Debian11) (crossConfig "javascript-unknown-ghcjs" (Emulator "js-emulator") (Just "emconfigure")
)
......@@ -932,7 +943,7 @@ job_groups =
make_wasm_jobs wasm_build_config {bignumBackend = Native}
, modifyValidateJobs manual $
make_wasm_jobs wasm_build_config {unregisterised = True}
, addValidateRule NonmovingGc (standardBuildsWithConfig Amd64 (Linux Debian11) vanilla {validateNonmovingGc = True})
, addValidateRule NonmovingGc (validateBuilds Amd64 (Linux Debian11) vanilla {validateNonmovingGc = True})
, modifyNightlyJobs (addJobRule Disable) $
addValidateRule IpeData (validateBuilds Amd64 (Linux Debian10) zstdIpe)
]
......@@ -940,9 +951,12 @@ job_groups =
where
-- ghcilink002 broken due to #17869
fullyStaticBrokenTests = modifyJobs (addVariable "BROKEN_TESTS" "ghcilink002 ")
--
-- linker_unload_native: due to musl not supporting any means of probing dynlib dependencies
-- (see Note [Object unloading]).
fullyStaticBrokenTests = modifyJobs (addVariable "BROKEN_TESTS" "ghcilink002 linker_unload_native")
hackage_doc_job = rename (<> "-hackage") . modifyJobs (addVariable "HADRIAN_ARGS" "--haddock-base-url")
hackage_doc_job = rename (<> "-hackage") . modifyJobs (addVariable "HADRIAN_ARGS" "--haddock-for-hackage")
tsan_jobs =
modifyJobs
......@@ -984,7 +998,7 @@ platform_mapping :: Map String (JobGroup BindistInfo)
platform_mapping = Map.map go $
Map.fromListWith combine [ (uncurry mkPlatform (jobPlatform (jobInfo $ v j)), j) | j <- filter hasReleaseBuild job_groups ]
where
whitelist = [ "x86_64-linux-alpine3_12-int_native-validate+fully_static"
whitelist = [ "x86_64-linux-alpine3_12-validate"
, "x86_64-linux-deb10-validate"
, "x86_64-linux-deb11-validate"
, "x86_64-linux-fedora33-release"
......
......@@ -55,7 +55,7 @@
"BIN_DIST_NAME": "ghc-aarch64-darwin-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
"HADRIAN_ARGS": "--docs=no-sphinx",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "11.0",
"NIX_SYSTEM": "aarch64-darwin",
......@@ -120,7 +120,7 @@
"TEST_ENV": "aarch64-linux-deb10-validate"
}
},
"i386-linux-deb9-validate": {
"i386-linux-deb10-validate": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
......@@ -130,7 +130,7 @@
"artifacts": {
"expire_in": "2 weeks",
"paths": [
"ghc-i386-linux-deb9-validate.tar.xz",
"ghc-i386-linux-deb10-validate.tar.xz",
"junit.xml"
],
"reports": {
......@@ -139,14 +139,14 @@
"when": "always"
},
"cache": {
"key": "i386-linux-deb9-$CACHE_REV",
"key": "i386-linux-deb10-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV",
"image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb10:$DOCKER_REV",
"needs": [
{
"artifacts": false,
......@@ -172,10 +172,10 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-i386-linux-deb9-validate",
"BIN_DIST_NAME": "ghc-i386-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "",
"TEST_ENV": "i386-linux-deb9-validate"
"TEST_ENV": "i386-linux-deb10-validate"
}
},
"nightly-aarch64-darwin-validate": {
......@@ -233,7 +233,7 @@
"BIN_DIST_NAME": "ghc-aarch64-darwin-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
"HADRIAN_ARGS": "--docs=no-sphinx",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "11.0",
"NIX_SYSTEM": "aarch64-darwin",
......@@ -241,6 +241,67 @@
"XZ_OPT": "-9"
}
},
"nightly-aarch64-linux-alpine3_18-validate": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
"cat ci_timings"
],
"allow_failure": false,
"artifacts": {
"expire_in": "8 weeks",
"paths": [
"ghc-aarch64-linux-alpine3_18-validate.tar.xz",
"junit.xml"
],
"reports": {
"junit": "junit.xml"
},
"when": "always"
},
"cache": {
"key": "aarch64-linux-alpine3_18-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-alpine3_18:$DOCKER_REV",
"needs": [
{
"artifacts": false,
"job": "hadrian-ghc-in-ghci"
}
],
"rules": [
{
"if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
"when": "on_success"
}
],
"script": [
"sudo chown ghc:ghc -R .",
".gitlab/ci.sh setup",
".gitlab/ci.sh configure",
".gitlab/ci.sh build_hadrian",
".gitlab/ci.sh test_hadrian"
],
"stage": "full-build",
"tags": [
"aarch64-linux"
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-aarch64-linux-alpine3_18-validate",
"BROKEN_TESTS": "encoding004 T10458 linker_unload_native",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-ld-override ",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"TEST_ENV": "aarch64-linux-alpine3_18-validate",
"XZ_OPT": "-9"
}
},
"nightly-aarch64-linux-deb10-validate": {
"after_script": [
".gitlab/ci.sh save_cache",
......@@ -359,7 +420,7 @@
"XZ_OPT": "-9"
}
},
"nightly-i386-linux-deb9-validate": {
"nightly-aarch64-linux-deb11-validate": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
......@@ -369,7 +430,7 @@
"artifacts": {
"expire_in": "8 weeks",
"paths": [
"ghc-i386-linux-deb9-validate.tar.xz",
"ghc-aarch64-linux-deb11-validate.tar.xz",
"junit.xml"
],
"reports": {
......@@ -378,14 +439,73 @@
"when": "always"
},
"cache": {
"key": "i386-linux-deb9-$CACHE_REV",
"key": "aarch64-linux-deb11-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV",
"image": "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb11:$DOCKER_REV",
"needs": [
{
"artifacts": false,
"job": "hadrian-ghc-in-ghci"
}
],
"rules": [
{
"if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
"when": "on_success"
}
],
"script": [
"sudo chown ghc:ghc -R .",
".gitlab/ci.sh setup",
".gitlab/ci.sh configure",
".gitlab/ci.sh build_hadrian",
".gitlab/ci.sh test_hadrian"
],
"stage": "full-build",
"tags": [
"aarch64-linux"
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-aarch64-linux-deb11-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "",
"TEST_ENV": "aarch64-linux-deb11-validate",
"XZ_OPT": "-9"
}
},
"nightly-i386-linux-deb10-validate": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
"cat ci_timings"
],
"allow_failure": false,
"artifacts": {
"expire_in": "8 weeks",
"paths": [
"ghc-i386-linux-deb10-validate.tar.xz",
"junit.xml"
],
"reports": {
"junit": "junit.xml"
},
"when": "always"
},
"cache": {
"key": "i386-linux-deb10-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb10:$DOCKER_REV",
"needs": [
{
"artifacts": false,
......@@ -411,10 +531,10 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-i386-linux-deb9-validate",
"BIN_DIST_NAME": "ghc-i386-linux-deb10-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "",
"TEST_ENV": "i386-linux-deb9-validate",
"TEST_ENV": "i386-linux-deb10-validate",
"XZ_OPT": "-9"
}
},
......@@ -473,9 +593,9 @@
"BIN_DIST_NAME": "ghc-x86_64-darwin-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
"HADRIAN_ARGS": "--docs=no-sphinx",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "10.10",
"MACOSX_DEPLOYMENT_TARGET": "10.13",
"NIX_SYSTEM": "x86_64-darwin",
"TEST_ENV": "x86_64-darwin-validate",
"XZ_OPT": "-9",
......@@ -598,10 +718,9 @@
"variables": {
"BIGNUM_BACKEND": "native",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-int_native-validate+fully_static",
"BROKEN_TESTS": "ghcilink002 encoding004 T10458 linker_unload_native",
"BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458 linker_unload_native",
"BUILD_FLAVOUR": "validate+fully_static",
"CONFIGURE_ARGS": "--disable-ld-override ",
"HADRIAN_ARGS": "--docs=no-sphinx",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"TEST_ENV": "x86_64-linux-alpine3_12-int_native-validate+fully_static",
"XZ_OPT": "-9"
......@@ -663,7 +782,6 @@
"BROKEN_TESTS": "encoding004 T10458 linker_unload_native",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--disable-ld-override ",
"HADRIAN_ARGS": "--docs=no-sphinx",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"TEST_ENV": "x86_64-linux-alpine3_12-validate",
"XZ_OPT": "-9"
......@@ -722,10 +840,9 @@
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-validate+fully_static",
"BROKEN_TESTS": "ghcilink002 encoding004 T10458 linker_unload_native",
"BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458 linker_unload_native",
"BUILD_FLAVOUR": "validate+fully_static",
"CONFIGURE_ARGS": "--disable-ld-override ",
"HADRIAN_ARGS": "--docs=no-sphinx",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"TEST_ENV": "x86_64-linux-alpine3_12-validate+fully_static",
"XZ_OPT": "-9"
......@@ -967,6 +1084,7 @@
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-centos7-validate",
"BROKEN_TESTS": "T22012",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "",
"HADRIAN_ARGS": "--docs=no-sphinx",
......@@ -1691,6 +1809,65 @@
"XZ_OPT": "-9"
}
},
"nightly-x86_64-linux-deb12-validate": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
"cat ci_timings"
],
"allow_failure": false,
"artifacts": {
"expire_in": "8 weeks",
"paths": [
"ghc-x86_64-linux-deb12-validate.tar.xz",
"junit.xml"
],
"reports": {
"junit": "junit.xml"
},
"when": "always"
},
"cache": {
"key": "x86_64-linux-deb12-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb12:$DOCKER_REV",
"needs": [
{
"artifacts": false,
"job": "hadrian-ghc-in-ghci"
}
],
"rules": [
{
"if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
"when": "on_success"
}
],
"script": [
"sudo chown ghc:ghc -R .",
".gitlab/ci.sh setup",
".gitlab/ci.sh configure",
".gitlab/ci.sh build_hadrian",
".gitlab/ci.sh test_hadrian"
],
"stage": "full-build",
"tags": [
"x86_64-linux"
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-deb12-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "",
"TEST_ENV": "x86_64-linux-deb12-validate",
"XZ_OPT": "-9"
}
},
"nightly-x86_64-linux-deb9-validate": {
"after_script": [
".gitlab/ci.sh save_cache",
......@@ -1866,7 +2043,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "",
"HADRIAN_ARGS": "--haddock-base-url",
"HADRIAN_ARGS": "--haddock-for-hackage",
"LLC": "/bin/false",
"OPT": "/bin/false",
"TEST_ENV": "x86_64-linux-fedora33-release",
......@@ -1934,6 +2111,65 @@
"XZ_OPT": "-9"
}
},
"nightly-x86_64-linux-fedora38-validate": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
"cat ci_timings"
],
"allow_failure": false,
"artifacts": {
"expire_in": "8 weeks",
"paths": [
"ghc-x86_64-linux-fedora38-validate.tar.xz",
"junit.xml"
],
"reports": {
"junit": "junit.xml"
},
"when": "always"
},
"cache": {
"key": "x86_64-linux-fedora38-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora38:$DOCKER_REV",
"needs": [
{
"artifacts": false,
"job": "hadrian-ghc-in-ghci"
}
],
"rules": [
{
"if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB != \"yes\") && ($NIGHTLY) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
"when": "on_success"
}
],
"script": [
"sudo chown ghc:ghc -R .",
".gitlab/ci.sh setup",
".gitlab/ci.sh configure",
".gitlab/ci.sh build_hadrian",
".gitlab/ci.sh test_hadrian"
],
"stage": "full-build",
"tags": [
"x86_64-linux"
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora38-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "",
"TEST_ENV": "x86_64-linux-fedora38-validate",
"XZ_OPT": "-9"
}
},
"nightly-x86_64-linux-rocky8-validate": {
"after_script": [
".gitlab/ci.sh save_cache",
......@@ -1989,7 +2225,6 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-rocky8-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "",
"HADRIAN_ARGS": "--docs=no-sphinx",
"TEST_ENV": "x86_64-linux-rocky8-validate",
"XZ_OPT": "-9"
}
......@@ -2164,7 +2399,7 @@
"CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "",
"GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"TEST_ENV": "x86_64-windows-int_native-validate",
......@@ -2223,7 +2458,7 @@
"CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "",
"GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"TEST_ENV": "x86_64-windows-validate",
......@@ -2285,7 +2520,7 @@
"BIN_DIST_NAME": "ghc-aarch64-darwin-release",
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "11.0",
......@@ -2294,6 +2529,69 @@
"XZ_OPT": "-9"
}
},
"release-aarch64-linux-alpine3_18-release+no_split_sections": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
"cat ci_timings"
],
"allow_failure": false,
"artifacts": {
"expire_in": "1 year",
"paths": [
"ghc-aarch64-linux-alpine3_18-release+no_split_sections.tar.xz",
"junit.xml"
],
"reports": {
"junit": "junit.xml"
},
"when": "always"
},
"cache": {
"key": "aarch64-linux-alpine3_18-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-alpine3_18:$DOCKER_REV",
"needs": [
{
"artifacts": false,
"job": "hadrian-ghc-in-ghci"
}
],
"rules": [
{
"if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
"when": "on_success"
}
],
"script": [
"sudo chown ghc:ghc -R .",
".gitlab/ci.sh setup",
".gitlab/ci.sh configure",
".gitlab/ci.sh build_hadrian",
".gitlab/ci.sh test_hadrian"
],
"stage": "full-build",
"tags": [
"aarch64-linux"
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-aarch64-linux-alpine3_18-release+no_split_sections",
"BROKEN_TESTS": "encoding004 T10458 linker_unload_native",
"BUILD_FLAVOUR": "release+no_split_sections",
"CONFIGURE_ARGS": "--disable-ld-override ",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"TEST_ENV": "aarch64-linux-alpine3_18-release+no_split_sections",
"XZ_OPT": "-9"
}
},
"release-aarch64-linux-deb10-release+no_split_sections": {
"after_script": [
".gitlab/ci.sh save_cache",
......@@ -2355,7 +2653,68 @@
"XZ_OPT": "-9"
}
},
"release-i386-linux-deb9-release+no_split_sections": {
"release-aarch64-linux-deb11-release+no_split_sections": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
"cat ci_timings"
],
"allow_failure": false,
"artifacts": {
"expire_in": "1 year",
"paths": [
"ghc-aarch64-linux-deb11-release+no_split_sections.tar.xz",
"junit.xml"
],
"reports": {
"junit": "junit.xml"
},
"when": "always"
},
"cache": {
"key": "aarch64-linux-deb11-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/aarch64-linux-deb11:$DOCKER_REV",
"needs": [
{
"artifacts": false,
"job": "hadrian-ghc-in-ghci"
}
],
"rules": [
{
"if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
"when": "on_success"
}
],
"script": [
"sudo chown ghc:ghc -R .",
".gitlab/ci.sh setup",
".gitlab/ci.sh configure",
".gitlab/ci.sh build_hadrian",
".gitlab/ci.sh test_hadrian"
],
"stage": "full-build",
"tags": [
"aarch64-linux"
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-aarch64-linux-deb11-release+no_split_sections",
"BUILD_FLAVOUR": "release+no_split_sections",
"CONFIGURE_ARGS": "",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"TEST_ENV": "aarch64-linux-deb11-release+no_split_sections",
"XZ_OPT": "-9"
}
},
"release-i386-linux-deb10-release+no_split_sections": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
......@@ -2365,7 +2724,7 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
"ghc-i386-linux-deb9-release+no_split_sections.tar.xz",
"ghc-i386-linux-deb10-release+no_split_sections.tar.xz",
"junit.xml"
],
"reports": {
......@@ -2374,14 +2733,14 @@
"when": "always"
},
"cache": {
"key": "i386-linux-deb9-$CACHE_REV",
"key": "i386-linux-deb10-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb9:$DOCKER_REV",
"image": "registry.gitlab.haskell.org/ghc/ci-images/i386-linux-deb10:$DOCKER_REV",
"needs": [
{
"artifacts": false,
......@@ -2407,12 +2766,12 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-i386-linux-deb9-release+no_split_sections",
"BIN_DIST_NAME": "ghc-i386-linux-deb10-release+no_split_sections",
"BUILD_FLAVOUR": "release+no_split_sections",
"CONFIGURE_ARGS": "",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"TEST_ENV": "i386-linux-deb9-release+no_split_sections",
"TEST_ENV": "i386-linux-deb10-release+no_split_sections",
"XZ_OPT": "-9"
}
},
......@@ -2471,10 +2830,10 @@
"BIN_DIST_NAME": "ghc-x86_64-darwin-release",
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "10.10",
"MACOSX_DEPLOYMENT_TARGET": "10.13",
"NIX_SYSTEM": "x86_64-darwin",
"TEST_ENV": "x86_64-darwin-release",
"XZ_OPT": "-9",
......@@ -2536,10 +2895,10 @@
"variables": {
"BIGNUM_BACKEND": "native",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-int_native-release+fully_static",
"BROKEN_TESTS": "ghcilink002 encoding004 T10458 linker_unload_native",
"BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458 linker_unload_native",
"BUILD_FLAVOUR": "release+fully_static",
"CONFIGURE_ARGS": "--disable-ld-override ",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"TEST_ENV": "x86_64-linux-alpine3_12-int_native-release+fully_static",
......@@ -2599,10 +2958,10 @@
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-release+fully_static+no_split_sections",
"BROKEN_TESTS": "ghcilink002 encoding004 T10458 linker_unload_native",
"BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458 linker_unload_native",
"BUILD_FLAVOUR": "release+fully_static+no_split_sections",
"CONFIGURE_ARGS": "--disable-ld-override ",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"TEST_ENV": "x86_64-linux-alpine3_12-release+fully_static+no_split_sections",
......@@ -2665,7 +3024,7 @@
"BROKEN_TESTS": "encoding004 T10458 linker_unload_native",
"BUILD_FLAVOUR": "release+no_split_sections",
"CONFIGURE_ARGS": "--disable-ld-override ",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"TEST_ENV": "x86_64-linux-alpine3_12-release+no_split_sections",
......@@ -2725,6 +3084,7 @@
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-centos7-release+no_split_sections",
"BROKEN_TESTS": "T22012",
"BUILD_FLAVOUR": "release+no_split_sections",
"CONFIGURE_ARGS": "",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
......@@ -2916,7 +3276,7 @@
"XZ_OPT": "-9"
}
},
"release-x86_64-linux-deb11-release+boot_nonmoving_gc": {
"release-x86_64-linux-deb12-release": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
......@@ -2926,7 +3286,7 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
"ghc-x86_64-linux-deb11-release+boot_nonmoving_gc.tar.xz",
"ghc-x86_64-linux-deb12-release.tar.xz",
"junit.xml"
],
"reports": {
......@@ -2935,14 +3295,14 @@
"when": "always"
},
"cache": {
"key": "x86_64-linux-deb11-$CACHE_REV",
"key": "x86_64-linux-deb12-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb11:$DOCKER_REV",
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-deb12:$DOCKER_REV",
"needs": [
{
"artifacts": false,
......@@ -2968,13 +3328,12 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-deb11-release+boot_nonmoving_gc",
"BUILD_FLAVOUR": "release+boot_nonmoving_gc",
"BIN_DIST_NAME": "ghc-x86_64-linux-deb12-release",
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"RUNTEST_ARGS": "--way=nonmoving --way=nonmoving_thr --way=nonmoving_thr_sanity",
"TEST_ENV": "x86_64-linux-deb11-release+boot_nonmoving_gc",
"TEST_ENV": "x86_64-linux-deb12-release",
"XZ_OPT": "-9"
}
},
......@@ -3220,7 +3579,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora33-release",
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "",
"HADRIAN_ARGS": "--haddock-base-url --hash-unit-ids",
"HADRIAN_ARGS": "--haddock-for-hackage --hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"LLC": "/bin/false",
"OPT": "/bin/false",
......@@ -3228,6 +3587,67 @@
"XZ_OPT": "-9"
}
},
"release-x86_64-linux-fedora38-release": {
"after_script": [
".gitlab/ci.sh save_cache",
".gitlab/ci.sh clean",
"cat ci_timings"
],
"allow_failure": false,
"artifacts": {
"expire_in": "1 year",
"paths": [
"ghc-x86_64-linux-fedora38-release.tar.xz",
"junit.xml"
],
"reports": {
"junit": "junit.xml"
},
"when": "always"
},
"cache": {
"key": "x86_64-linux-fedora38-$CACHE_REV",
"paths": [
"cabal-cache",
"toolchain"
]
},
"dependencies": [],
"image": "registry.gitlab.haskell.org/ghc/ci-images/x86_64-linux-fedora38:$DOCKER_REV",
"needs": [
{
"artifacts": false,
"job": "hadrian-ghc-in-ghci"
}
],
"rules": [
{
"if": "($CI_MERGE_REQUEST_LABELS !~ /.*fast-ci.*/) && ($RELEASE_JOB == \"yes\") && ($NIGHTLY == null) && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\") && (\"true\" == \"true\")",
"when": "on_success"
}
],
"script": [
"sudo chown ghc:ghc -R .",
".gitlab/ci.sh setup",
".gitlab/ci.sh configure",
".gitlab/ci.sh build_hadrian",
".gitlab/ci.sh test_hadrian"
],
"stage": "full-build",
"tags": [
"x86_64-linux"
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-fedora38-release",
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"TEST_ENV": "x86_64-linux-fedora38-release",
"XZ_OPT": "-9"
}
},
"release-x86_64-linux-rocky8-release": {
"after_script": [
".gitlab/ci.sh save_cache",
......@@ -3283,7 +3703,7 @@
"BIN_DIST_NAME": "ghc-x86_64-linux-rocky8-release",
"BUILD_FLAVOUR": "release",
"CONFIGURE_ARGS": "",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
"HADRIAN_ARGS": "--hash-unit-ids",
"IGNORE_PERF_FAILURES": "all",
"TEST_ENV": "x86_64-linux-rocky8-release",
"XZ_OPT": "-9"
......@@ -3411,7 +3831,7 @@
"XZ_OPT": "-9"
}
},
"release-x86_64-windows-int_native-release+no_split_sections": {
"release-x86_64-windows-int_native-release": {
"after_script": [
"bash .gitlab/ci.sh save_cache",
"bash .gitlab/ci.sh clean"
......@@ -3420,7 +3840,7 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
"ghc-x86_64-windows-int_native-release+no_split_sections.tar.xz",
"ghc-x86_64-windows-int_native-release.tar.xz",
"junit.xml"
],
"reports": {
......@@ -3458,20 +3878,20 @@
],
"variables": {
"BIGNUM_BACKEND": "native",
"BIN_DIST_NAME": "ghc-x86_64-windows-int_native-release+no_split_sections",
"BUILD_FLAVOUR": "release+no_split_sections",
"BIN_DIST_NAME": "ghc-x86_64-windows-int_native-release",
"BUILD_FLAVOUR": "release",
"CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "",
"GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"TEST_ENV": "x86_64-windows-int_native-release+no_split_sections",
"TEST_ENV": "x86_64-windows-int_native-release",
"XZ_OPT": "-9"
}
},
"release-x86_64-windows-release+no_split_sections": {
"release-x86_64-windows-release": {
"after_script": [
"bash .gitlab/ci.sh save_cache",
"bash .gitlab/ci.sh clean"
......@@ -3480,7 +3900,7 @@
"artifacts": {
"expire_in": "1 year",
"paths": [
"ghc-x86_64-windows-release+no_split_sections.tar.xz",
"ghc-x86_64-windows-release.tar.xz",
"junit.xml"
],
"reports": {
......@@ -3518,16 +3938,16 @@
],
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-windows-release+no_split_sections",
"BUILD_FLAVOUR": "release+no_split_sections",
"BIN_DIST_NAME": "ghc-x86_64-windows-release",
"BUILD_FLAVOUR": "release",
"CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "",
"GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx",
"HADRIAN_ARGS": "--hash-unit-ids --docs=no-sphinx-pdfs",
"IGNORE_PERF_FAILURES": "all",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"TEST_ENV": "x86_64-windows-release+no_split_sections",
"TEST_ENV": "x86_64-windows-release",
"XZ_OPT": "-9"
}
},
......@@ -3586,9 +4006,9 @@
"BIN_DIST_NAME": "ghc-x86_64-darwin-validate",
"BUILD_FLAVOUR": "validate",
"CONFIGURE_ARGS": "--with-intree-gmp --with-system-libffi ",
"HADRIAN_ARGS": "--docs=no-sphinx",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"LANG": "en_US.UTF-8",
"MACOSX_DEPLOYMENT_TARGET": "10.10",
"MACOSX_DEPLOYMENT_TARGET": "10.13",
"NIX_SYSTEM": "x86_64-darwin",
"TEST_ENV": "x86_64-darwin-validate",
"ac_cv_func_clock_gettime": "no",
......@@ -3709,10 +4129,9 @@
"variables": {
"BIGNUM_BACKEND": "gmp",
"BIN_DIST_NAME": "ghc-x86_64-linux-alpine3_12-validate+fully_static",
"BROKEN_TESTS": "ghcilink002 encoding004 T10458 linker_unload_native",
"BROKEN_TESTS": "ghcilink002 linker_unload_native encoding004 T10458 linker_unload_native",
"BUILD_FLAVOUR": "validate+fully_static",
"CONFIGURE_ARGS": "--disable-ld-override ",
"HADRIAN_ARGS": "--docs=no-sphinx",
"INSTALL_CONFIGURE_ARGS": "--disable-ld-override",
"TEST_ENV": "x86_64-linux-alpine3_12-validate+fully_static"
}
......@@ -4660,7 +5079,7 @@
"CABAL_INSTALL_VERSION": "3.8.1.0",
"CONFIGURE_ARGS": "",
"GHC_VERSION": "9.4.3",
"HADRIAN_ARGS": "--docs=no-sphinx",
"HADRIAN_ARGS": "--docs=no-sphinx-pdfs",
"LANG": "en_US.UTF-8",
"MSYSTEM": "CLANG64",
"TEST_ENV": "x86_64-windows-validate"
......
......@@ -18,25 +18,31 @@ def job_triple(job_name):
bindists = {
'release-x86_64-windows-release': 'x86_64-unknown-mingw32',
'release-x86_64-windows-int_native-release': 'x86_64-unknown-mingw32-int_native',
'release-x86_64-rocky8-release': 'x86_64-rocky8-linux',
'release-x86_64-linux-rocky8-release': 'x86_64-rocky8-linux',
'release-x86_64-linux-ubuntu20_04-release': 'x86_64-ubuntu20_04-linux',
'release-x86_64-linux-ubuntu18_04-release': 'x86_64-ubuntu18_04-linux',
'release-x86_64-linux-fedora33-release+debug_info': 'x86_64-fedora33-linux-dwarf',
'release-x86_64-linux-fedora33-release': 'x86_64-fedora33-linux',
'release-x86_64-linux-fedora38-release': 'x86_64-fedora38-linux',
'release-x86_64-linux-fedora27-release': 'x86_64-fedora27-linux',
'release-x86_64-linux-deb11-release': 'x86_64-deb11-linux',
'release-x86_64-linux-deb12-release': 'x86_64-deb12-linux',
'release-x86_64-linux-deb10-release+debug_info': 'x86_64-deb10-linux-dwarf',
'release-x86_64-linux-deb10-release': 'x86_64-deb10-linux',
'release-x86_64-linux-deb9-release': 'x86_64-deb9-linux',
'release-x86_64-linux-centos7-release': 'x86_64-centos7-linux',
'release-x86_64-linux-alpine3_12-release+no_split_sections': 'x86_64-alpine3_12-linux',
'release-x86_64-linux-alpine3_12-release+fully_static': 'x86_64-alpine3_12-linux-static',
'release-x86_64-linux-alpine3_12-release': 'x86_64-alpine3_12-linux',
'release-x86_64-linux-alpine3_12-int_native-release+fully_static': 'x86_64-alpine3_12-linux-static-int_native',
'release-x86_64-darwin-release': 'x86_64-apple-darwin',
'release-i386-linux-deb10-release+no_split_sections': 'i386-deb10-linux',
'release-i386-linux-deb9-release': 'i386-deb9-linux',
'release-armv7-linux-deb10-release': 'armv7-deb10-linux',
'release-aarch64-linux-deb10-release': 'aarch64-deb10-linux',
'release-aarch64-linux-deb11-release': 'aarch64-deb11-linux',
'release-aarch64-linux-alpine3_18-release+no_split_sections': 'aarch64-alpine3_18-linux',
'release-aarch64-darwin-release': 'aarch64-apple-darwin',
'release-x86_64-linux-deb11-release+boot_nonmoving_gc': 'unused',
'source-tarball': 'src',
'package-hadrian-bootstrap-sources': 'hadrian-bootstrap-sources',
......
......@@ -36,6 +36,7 @@ import os
import yaml
import gitlab
from urllib.request import urlopen
from urllib.parse import urlparse
import hashlib
import sys
import json
......@@ -80,7 +81,7 @@ source_artifact = Artifact('source-tarball'
test_artifact = Artifact('source-tarball'
, 'ghc-{version}-testsuite.tar.xz'
, 'ghc-{version}-testsuite.tar.xz'
, 'ghc-{version}' )
, 'ghc-{version}/testsuite' )
def debian(arch, n):
return linux_platform(arch, "{arch}-linux-deb{n}".format(arch=arch, n=n))
......@@ -141,8 +142,14 @@ def mk_one_metadata(release_mode, version, job_map, artifact):
# In --release-mode, the URL in the metadata needs to point into the downloads folder
# rather then the pipeline.
if release_mode:
# the test artifact is bundled with the source artifact, so it doesn't have its own job name
# So we must manually set the name of the bindist location
if artifact == test_artifact:
bindist_name = "testsuite"
else:
bindist_name = fetch_gitlab.job_triple(artifact.job_name)
final_url = release_base.format( version=version
, bindistName=urllib.parse.quote_plus(f"{fetch_gitlab.job_triple(artifact.job_name)}.tar.xz"))
, bindistName=urllib.parse.quote_plus(f"{bindist_name}.tar.xz"))
else:
final_url = url
......@@ -150,13 +157,18 @@ def mk_one_metadata(release_mode, version, job_map, artifact):
eprint(f"Bindist URL: {url}")
eprint(f"Download URL: {final_url}")
#Download and hash from the release pipeline, this must not change anyway during upload.
# Download and hash from the release pipeline, this must not change anyway during upload.
h = download_and_hash(url)
res = { "dlUri": final_url
, "dlSubdir": artifact.subdir.format(version=version)
, "dlOutput": artifact.output_name.format(version=version)
, "dlHash" : h }
# Only add dlOutput if it is inconsistent with the filename inferred from the URL
output = artifact.output_name.format(version=version)
if Path(urlparse(final_url).path).name != output:
res["dlOutput"] = output
eprint(res)
return res
......@@ -191,7 +203,7 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map):
deb10 = mk(debian("x86_64", 10))
deb11 = mk(debian("x86_64", 11))
deb10_arm64 = mk(debian("aarch64", 10))
deb9_i386 = mk(debian("i386", 9))
deb10_i386 = mk(debian("i386", 10))
source = mk_one_metadata(release_mode, version, job_map, source_artifact)
test = mk_one_metadata(release_mode, version, job_map, test_artifact)
......@@ -221,10 +233,10 @@ def mk_new_yaml(release_mode, version, date, pipeline_type, job_map):
}
a32 = { "Linux_Debian": { "<10": deb9_i386, "unknown_versioning": deb9_i386 }
, "Linux_Ubuntu": { "unknown_versioning": deb9_i386 }
, "Linux_Mint" : { "unknown_versioning": deb9_i386 }
, "Linux_UnknownLinux" : { "unknown_versioning": deb9_i386 }
a32 = { "Linux_Debian": { "unknown_versioning": deb10_i386 }
, "Linux_Ubuntu": { "unknown_versioning": deb10_i386 }
, "Linux_Mint" : { "unknown_versioning": deb10_i386 }
, "Linux_UnknownLinux" : { "unknown_versioning": deb10_i386 }
}
arm64 = { "Linux_UnknownLinux": { "unknown_versioning": deb10_arm64 }
......
......@@ -83,6 +83,7 @@ function hash_files() {
echo $(find -maxdepth 1 \
-iname '*.xz' \
-o -iname '*.lz' \
-o -iname '*.gz' \
-o -iname '*.bz2' \
-o -iname '*.zip' \
)
......
......@@ -101,7 +101,6 @@ PACKAGES = {
Package('ghc-boot', Path("libraries/ghc-boot"), prep_ghc_boot),
Package('ghc-boot-th', Path("libraries/ghc-boot-th"), no_prep),
Package('ghc-compact', Path("libraries/ghc-compact"), no_prep),
Package('libiserv', Path("libraries/libiserv"), no_prep),
Package('ghc', Path("compiler"), prep_ghc),
]
}
......
......@@ -17,7 +17,12 @@ fail() {
function pull() {
local ref="refs/notes/$REF"
run git fetch -f "$NOTES_ORIGIN" "$ref:$ref"
# 2023-10-04: `git fetch` started failing, first on Darwin in CI and then on
# Linux locally, both using git version 2.40.1. See #24055. One workaround is
# to set a larger http.postBuffer, although this is definitely a workaround.
# The default should work just fine. The error could be in git, GitLab, or
# perhaps the networking tube (including all proxies etc) between the two.
run git -c http.postBuffer=2097152 fetch -f "$NOTES_ORIGIN" "$ref:$ref"
echo "perf notes ref $ref is $(git rev-parse $ref)"
}
......
......@@ -203,6 +203,39 @@ import GHC.Platform.Reg
# define d29 61
# define d30 62
# define d31 63
# define q0 32
# define q1 33
# define q2 34
# define q3 35
# define q4 36
# define q5 37
# define q6 38
# define q7 39
# define q8 40
# define q9 41
# define q10 42
# define q11 43
# define q12 44
# define q13 45
# define q14 46
# define q15 47
# define q16 48
# define q17 49
# define q18 50
# define q19 51
# define q20 52
# define q21 53
# define q22 54
# define q23 55
# define q24 56
# define q25 57
# define q26 58
# define q27 59
# define q28 60
# define q29 61
# define q30 62
# define q31 63
#endif
# if defined(MACHREGS_darwin)
......
......@@ -397,6 +397,7 @@ import GHC.Types.Name.Ppr
import GHC.Types.TypeEnv
import GHC.Types.BreakInfo
import GHC.Types.PkgQual
import GHC.Types.Unique.FM
import GHC.Unit
import GHC.Unit.Env
......@@ -676,6 +677,7 @@ setTopSessionDynFlags :: GhcMonad m => DynFlags -> m ()
setTopSessionDynFlags dflags = do
hsc_env <- getSession
logger <- getLogger
lookup_cache <- liftIO $ newMVar emptyUFM
-- Interpreter
interp <- if
......@@ -705,7 +707,7 @@ setTopSessionDynFlags dflags = do
}
s <- liftIO $ newMVar InterpPending
loader <- liftIO Loader.uninitializedLoader
return (Just (Interp (ExternalInterp (ExtIServ (ExtInterpState conf s))) loader))
return (Just (Interp (ExternalInterp (ExtIServ (ExtInterpState conf s))) loader lookup_cache))
-- JavaScript interpreter
| ArchJavaScript <- platformArch (targetPlatform dflags)
......@@ -723,7 +725,7 @@ setTopSessionDynFlags dflags = do
, jsInterpFinderOpts = initFinderOpts dflags
, jsInterpFinderCache = hsc_FC hsc_env
}
return (Just (Interp (ExternalInterp (ExtJS (ExtInterpState cfg s))) loader))
return (Just (Interp (ExternalInterp (ExtJS (ExtInterpState cfg s))) loader lookup_cache))
-- Internal interpreter
| otherwise
......@@ -731,7 +733,7 @@ setTopSessionDynFlags dflags = do
#if defined(HAVE_INTERNAL_INTERPRETER)
do
loader <- liftIO Loader.uninitializedLoader
return (Just (Interp InternalInterp loader))
return (Just (Interp InternalInterp loader lookup_cache))
#else
return Nothing
#endif
......@@ -1518,9 +1520,7 @@ modInfoModBreaks :: ModuleInfo -> ModBreaks
modInfoModBreaks = minf_modBreaks
isDictonaryId :: Id -> Bool
isDictonaryId id
= case tcSplitSigmaTy (idType id) of {
(_tvs, _theta, tau) -> isDictTy tau }
isDictonaryId id = isDictTy (idType id)
-- | Looks up a global name: that is, any top-level name in any
-- visible module. Unlike 'lookupName', lookupGlobalName does not use
......
......@@ -1636,10 +1636,11 @@ boxedRepDataCon = pcSpecialDataCon boxedRepDataConName
where
-- See Note [Getting from RuntimeRep to PrimRep] in RepType
prim_rep_fun [lev]
= case tyConPromDataConInfo (tyConAppTyCon lev) of
Levity Lifted -> [LiftedRep]
Levity Unlifted -> [UnliftedRep]
_ -> pprPanic "boxedRepDataCon" (ppr lev)
= case tyConAppTyCon_maybe lev of
Just tc -> case tyConPromDataConInfo tc of
Levity l -> [BoxedRep (Just l)]
_ -> [BoxedRep Nothing]
Nothing -> [BoxedRep Nothing]
prim_rep_fun args
= pprPanic "boxedRepDataCon" (ppr args)
......
......@@ -66,8 +66,10 @@ import GHC.Data.FastString
import GHC.Utils.Outputable
import GHC.Utils.Panic
import GHC.Utils.Panic.Plain (assert)
import Data.Maybe
import GHC.Utils.Word64 (word64ToInt)
-- | Get the 'Name' associated with a known-key 'Unique'.
knownUniqueName :: Unique -> Maybe Name
......@@ -83,7 +85,9 @@ knownUniqueName u =
'm' -> Just $ getCTupleDataConName n
_ -> Nothing
where
(tag, n) = unpkUnique u
(tag, n') = unpkUnique u
-- Known unique names are guaranteed to fit in Int, so we don't need the whole Word64.
n = assert (isValidKnownKeyUnique u) (word64ToInt n')
{-
Note [Unique layout for unboxed sums]
......@@ -115,14 +119,14 @@ mkSumTyConUnique arity =
assertPpr (arity <= 0x3f) (ppr arity) $
-- 0x3f since we only have 6 bits to encode the
-- alternative
mkUnique 'z' (arity `shiftL` 8 .|. 0xfc)
mkUniqueInt 'z' (arity `shiftL` 8 .|. 0xfc)
mkSumDataConUnique :: ConTagZ -> Arity -> Unique
mkSumDataConUnique alt arity
| alt >= arity
= panic ("mkSumDataConUnique: " ++ show alt ++ " >= " ++ show arity)
| otherwise
= mkUnique 'z' (arity `shiftL` 8 + alt `shiftL` 2) {- skip the tycon -}
= mkUniqueInt 'z' (arity `shiftL` 8 + alt `shiftL` 2) {- skip the tycon -}
getUnboxedSumName :: Int -> Name
getUnboxedSumName n
......@@ -209,17 +213,17 @@ selector Uniques takes inspiration from the encoding for unboxed sum Uniques.
-}
mkCTupleTyConUnique :: Arity -> Unique
mkCTupleTyConUnique a = mkUnique 'k' (2*a)
mkCTupleTyConUnique a = mkUniqueInt 'k' (2*a)
mkCTupleDataConUnique :: Arity -> Unique
mkCTupleDataConUnique a = mkUnique 'm' (3*a)
mkCTupleDataConUnique a = mkUniqueInt 'm' (3*a)
mkCTupleSelIdUnique :: ConTagZ -> Arity -> Unique
mkCTupleSelIdUnique sc_pos arity
| sc_pos >= arity
= panic ("mkCTupleSelIdUnique: " ++ show sc_pos ++ " >= " ++ show arity)
| otherwise
= mkUnique 'j' (arity `shiftL` cTupleSelIdArityBits + sc_pos)
= mkUniqueInt 'j' (arity `shiftL` cTupleSelIdArityBits + sc_pos)
getCTupleTyConName :: Int -> Name
getCTupleTyConName n =
......@@ -262,12 +266,12 @@ cTupleSelIdPosBitmask = 0xff
-- Normal tuples
mkTupleDataConUnique :: Boxity -> Arity -> Unique
mkTupleDataConUnique Boxed a = mkUnique '7' (3*a) -- may be used in C labels
mkTupleDataConUnique Unboxed a = mkUnique '8' (3*a)
mkTupleDataConUnique Boxed a = mkUniqueInt '7' (3*a) -- may be used in C labels
mkTupleDataConUnique Unboxed a = mkUniqueInt '8' (3*a)
mkTupleTyConUnique :: Boxity -> Arity -> Unique
mkTupleTyConUnique Boxed a = mkUnique '4' (2*a)
mkTupleTyConUnique Unboxed a = mkUnique '5' (2*a)
mkTupleTyConUnique Boxed a = mkUniqueInt '4' (2*a)
mkTupleTyConUnique Unboxed a = mkUniqueInt '5' (2*a)
-- | This function is an inverse of `mkTupleTyConUnique`
isTupleTyConUnique :: Unique -> Maybe (Boxity, Arity)
......@@ -278,7 +282,8 @@ isTupleTyConUnique u =
_ -> Nothing
where
(tag, n) = unpkUnique u
(arity, i) = quotRem n 2
(arity', i) = quotRem n 2
arity = word64ToInt arity'
getTupleTyConName :: Boxity -> Int -> Name
getTupleTyConName boxity n =
......@@ -298,7 +303,7 @@ getTupleDataConName boxity n =
_ -> panic "getTupleDataConName: impossible"
{-
Note [Uniques for wired-in prelude things and known masks]
Note [Uniques for wired-in prelude things and known tags]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Allocation of unique supply characters:
v,u: for renumbering value-, and usage- vars.
......@@ -358,27 +363,27 @@ mkPrimOpIdUnique :: Int -> Unique
mkPrimOpWrapperUnique :: Int -> Unique
mkPreludeMiscIdUnique :: Int -> Unique
mkAlphaTyVarUnique i = mkUnique '1' i
mkPreludeClassUnique i = mkUnique '2' i
mkAlphaTyVarUnique i = mkUniqueInt '1' i
mkPreludeClassUnique i = mkUniqueInt '2' i
--------------------------------------------------
mkPrimOpIdUnique op = mkUnique '9' (2*op)
mkPrimOpWrapperUnique op = mkUnique '9' (2*op+1)
mkPreludeMiscIdUnique i = mkUnique '0' i
mkPrimOpIdUnique op = mkUniqueInt '9' (2*op)
mkPrimOpWrapperUnique op = mkUniqueInt '9' (2*op+1)
mkPreludeMiscIdUnique i = mkUniqueInt '0' i
mkPseudoUniqueE, mkBuiltinUnique :: Int -> Unique
mkBuiltinUnique i = mkUnique 'B' i
mkPseudoUniqueE i = mkUnique 'E' i -- used in NCG spiller to create spill VirtualRegs
mkBuiltinUnique i = mkUniqueInt 'B' i
mkPseudoUniqueE i = mkUniqueInt 'E' i -- used in NCG spiller to create spill VirtualRegs
mkRegSingleUnique, mkRegPairUnique, mkRegSubUnique, mkRegClassUnique :: Int -> Unique
mkRegSingleUnique = mkUnique 'R'
mkRegSubUnique = mkUnique 'S'
mkRegPairUnique = mkUnique 'P'
mkRegClassUnique = mkUnique 'L'
mkRegSingleUnique = mkUniqueInt 'R'
mkRegSubUnique = mkUniqueInt 'S'
mkRegPairUnique = mkUniqueInt 'P'
mkRegClassUnique = mkUniqueInt 'L'
mkCostCentreUnique :: Int -> Unique
mkCostCentreUnique = mkUnique 'C'
mkCostCentreUnique = mkUniqueInt 'C'
varNSUnique, dataNSUnique, tvNSUnique, tcNSUnique :: Unique
varNSUnique = mkUnique 'i' 0
......@@ -387,7 +392,7 @@ tvNSUnique = mkUnique 'v' 0
tcNSUnique = mkUnique 'c' 0
mkFldNSUnique :: FastString -> Unique
mkFldNSUnique fs = mkUnique 'f' (uniqueOfFS fs)
mkFldNSUnique fs = mkUniqueInt 'f' (uniqueOfFS fs)
isFldNSUnique :: Unique -> Bool
isFldNSUnique uniq = case unpkUnique uniq of
......@@ -401,7 +406,7 @@ initExitJoinUnique = mkUnique 's' 0
-- See Note [Related uniques for wired-in things]
mkPreludeTyConUnique :: Int -> Unique
mkPreludeTyConUnique i = mkUnique '3' (2*i)
mkPreludeTyConUnique i = mkUniqueInt '3' (2*i)
tyConRepNameUnique :: Unique -> Unique
tyConRepNameUnique u = incrUnique u
......@@ -411,7 +416,7 @@ tyConRepNameUnique u = incrUnique u
-- See Note [Related uniques for wired-in things]
mkPreludeDataConUnique :: Int -> Unique
mkPreludeDataConUnique i = mkUnique '6' (3*i) -- Must be alphabetic
mkPreludeDataConUnique i = mkUniqueInt '6' (3*i) -- Must be alphabetic
dataConTyRepNameUnique, dataConWorkerUnique :: Unique -> Unique
dataConWorkerUnique u = incrUnique u
......@@ -437,7 +442,7 @@ dataConTyRepNameUnique u = stepUnique u 2
-- A little delicate!
mkBoxingTyConUnique :: Int -> Unique
mkBoxingTyConUnique i = mkUnique 'b' (5*i)
mkBoxingTyConUnique i = mkUniqueInt 'b' (5*i)
boxingDataConUnique :: Unique -> Unique
boxingDataConUnique u = stepUnique u 2
#!/usr/bin/env python
# -*- coding: utf-8 -*-
# This script generates the primop descriptions for many similar ByteArray#
# and Addr# access operations. Its output is #include-d into primops.txt.pp.
from typing import Optional, NamedTuple
import textwrap
import argparse
arg_parser = argparse.ArgumentParser()
arg_parser.add_argument('addr_or_bytearray',
choices = ["addr-access-ops", "bytearray-access-ops"],
)
arg_parser.add_argument('output_file',
type=argparse.FileType('w'),
metavar='FILE',
)
args = arg_parser.parse_args()
write = args.output_file.write
write('''
-- Do not edit.
-- This file is generated by compiler/GHC/Builtin/gen_bytearray_addr_access_ops.py.
-- (The build system should take care of this for you.)
''')
class ElementType(NamedTuple):
name: str
rep_ty: str
desc: str
width: Optional[int]
MACH_WORD = None
element_types = [
# (name, representation type, human description, width)
#
# width in bytes.
# width == None denotes machine word
ElementType("Char", "Char#", "8-bit character", 1),
ElementType("WideChar", "Char#", "32-bit character", 4),
ElementType("Int", "Int#", "word-sized integer", MACH_WORD),
ElementType("Word", "Word#", "word-sized unsigned integer", MACH_WORD),
ElementType("Addr", "Addr#", "machine address", MACH_WORD),
ElementType("Float", "Float#", "single-precision floating-point value", 4),
ElementType("Double", "Double#", "double-precision floating-point value", 8),
ElementType("StablePtr", "StablePtr# a", "'StablePtr#' value", MACH_WORD),
]
for n in [8,16,32,64]:
element_types += [
ElementType(f"Int{n}", f"Int{n}#",
f"{n}-bit signed integer", n // 8),
ElementType(f"Word{n}", f"Word{n}#",
f"{n}-bit unsigned integer", n // 8)
]
def pretty_offset(n: Optional[int]) -> str:
if n == MACH_WORD:
return 'machine words'
elif n == 1:
return 'bytes'
else:
return f'{n}-byte words'
def get_align_warn(n: ElementType) -> str:
if n.width == 1:
return ''
return '''
On some platforms, the access may fail
for an insufficiently aligned @Addr#@.
'''
def print_block(template: str, **kwargs) -> None:
write(textwrap.dedent(template.format(**kwargs)).lstrip())
write('\n')
def header(s: str):
write('\n')
print_block('''
------------------------------------
-- {s}
------------------------------------
''', s=s)
if args.addr_or_bytearray == "bytearray-access-ops":
header("ByteArray# operations")
header('aligned index operations')
for t in element_types:
offset = pretty_offset(t.width)
print_block('''
primop IndexByteArrayOp_{name} "index{name}Array#" GenPrimOp
ByteArray# -> Int# -> {rep_ty}
{{Read a {desc}; offset in {offset}.}}
with can_fail = True
''', offset = offset, **t._asdict())
header('unaligned index operations')
for t in element_types:
if t.name in ['Int8', 'Word8']: continue
print_block('''
primop IndexByteArrayOp_Word8As{name} "indexWord8ArrayAs{name}#" GenPrimOp
ByteArray# -> Int# -> {rep_ty}
{{Read a {desc}; offset in bytes.}}
with can_fail = True
''', **t._asdict())
header('aligned read operations')
for t in element_types:
offset = pretty_offset(t.width)
print_block('''
primop ReadByteArrayOp_{name} "read{name}Array#" GenPrimOp
MutableByteArray# s -> Int# -> State# s -> (# State# s, {rep_ty} #)
{{Read a {desc}; offset in {offset}.}}
with has_side_effects = True
can_fail = True
''', offset = offset, **t._asdict())
header('unaligned read operations')
for t in element_types:
if t.name in ['Int8', 'Word8']: continue
print_block('''
primop ReadByteArrayOp_Word8As{name} "readWord8ArrayAs{name}#" GenPrimOp
MutableByteArray# s -> Int# -> State# s -> (# State# s, {rep_ty} #)
{{Read a {desc}; offset in bytes.}}
with has_side_effects = True
can_fail = True
''', **t._asdict())
header('aligned write operations')
for t in element_types:
offset = pretty_offset(t.width)
print_block('''
primop WriteByteArrayOp_{name} "write{name}Array#" GenPrimOp
MutableByteArray# s -> Int# -> {rep_ty} -> State# s -> State# s
{{Write a {desc}; offset in {offset}.}}
with has_side_effects = True
can_fail = True
''', offset = offset, **t._asdict())
header('unaligned write operations')
for t in element_types:
if t.name in ['Int8', 'Word8']: continue
print_block('''
primop WriteByteArrayOp_Word8As{name} "writeWord8ArrayAs{name}#" GenPrimOp
MutableByteArray# s -> Int# -> {rep_ty} -> State# s -> State# s
{{Write a {desc}; offset in bytes.}}
with has_side_effects = True
can_fail = True
''', **t._asdict())
else: # addr_or_bytearray == "addr-access-ops":
header("Addr# access operations")
header('aligned index operations')
for t in element_types:
offset = pretty_offset(t.width)
align_warn = get_align_warn(t)
print_block('''
primop IndexOffAddrOp_{name} "index{name}OffAddr#" GenPrimOp
Addr# -> Int# -> {rep_ty}
{{ Read a {desc}; offset in {offset}.
{align_warn}
}}
with can_fail = True
''', offset = offset, align_warn = align_warn, **t._asdict())
header('aligned read operations')
for t in element_types:
offset = pretty_offset(t.width)
align_warn = get_align_warn(t)
print_block('''
primop ReadOffAddrOp_{name} "read{name}OffAddr#" GenPrimOp
Addr# -> Int# -> State# s -> (# State# s, {rep_ty} #)
{{ Read a {desc}; offset in {offset}.
{align_warn}
}}
with has_side_effects = True
can_fail = True
''', offset = offset, align_warn = align_warn, **t._asdict())
header('aligned write operations')
for t in element_types:
offset = pretty_offset(t.width)
align_warn = get_align_warn(t)
print_block('''
primop WriteOffAddrOp_{name} "write{name}OffAddr#" GenPrimOp
Addr# -> Int# -> {rep_ty} -> State# s -> State# s
{{ Write a {desc}; offset in {offset}.
{align_warn}
}}
with has_side_effects = True
can_fail = True
''', offset = offset, align_warn = align_warn, **t._asdict())
......@@ -1941,7 +1941,11 @@ primop GetSizeofMutableByteArrayOp "getSizeofMutableByteArray#" GenPrimOp
@since 0.5.0.0}
#include "bytearray-access-ops.txt.pp"
bytearray_access_ops
-- This generates a whole bunch of primops;
-- see utils/genprimopcode/AccessOps.hs
primop CompareByteArraysOp "compareByteArrays#" GenPrimOp
ByteArray# -> Int# -> ByteArray# -> Int# -> Int# -> Int#
......@@ -2242,7 +2246,11 @@ primop AddrNeOp "neAddr#" Compare Addr# -> Addr# -> Int#
primop AddrLtOp "ltAddr#" Compare Addr# -> Addr# -> Int#
primop AddrLeOp "leAddr#" Compare Addr# -> Addr# -> Int#
#include "addr-access-ops.txt.pp"
addr_access_ops
-- This generates a whole bunch of primops;
-- see utils/genprimopcode/AccessOps.hs
primop InterlockedExchange_Addr "atomicExchangeAddrAddr#" GenPrimOp
Addr# -> Addr# -> State# s -> (# State# s, Addr# #)
......@@ -2527,18 +2535,45 @@ primop CasMutVarOp "casMutVar#" GenPrimOp
section "Exceptions"
------------------------------------------------------------------------
-- Note [Strictness for mask/unmask/catch]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- Note [Strict IO wrappers]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~
-- Consider this example, which comes from GHC.IO.Handle.Internals:
-- wantReadableHandle3 f ma b st
-- wantReadableHandle3 f mv b st
-- = case ... of
-- DEFAULT -> case ma of MVar a -> ...
-- 0# -> maskAsyncExceptions# (\st -> case ma of MVar a -> ...)
-- DEFAULT -> case mv of MVar a -> ...
-- 0# -> maskAsyncExceptions# (\st -> case mv of MVar a -> ...)
-- The outer case just decides whether to mask exceptions, but we don't want
-- thereby to hide the strictness in 'ma'! Hence the use of strictOnceApply1Dmd
-- in mask and unmask. But catch really is lazy in its first argument, see
-- #11555. So for IO actions 'ma' we often use a wrapper around it that is
-- head-strict in 'ma': GHC.IO.catchException.
-- thereby to hide the strictness in `mv`! Hence the use of strictOnceApply1Dmd
-- in mask#, unmask# and atomically# (where we use strictManyApply1Dmd to respect
-- that it potentially calls its action multiple times).
--
-- Note [Strictness for catch-style primops]
-- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-- The catch#-style primops always call their action, just like outlined
-- in Note [Strict IO wrappers].
-- However, it is important that we give their first arg lazyApply1Dmd and not
-- strictOnceApply1Dmd, like for mask#. Here is why. Consider a call
--
-- catch# act handler s
--
-- If `act = raiseIO# ...`, using strictOnceApply1Dmd for `act` would mean that
-- the call forwards the dead-end flag from `act` (see Note [Dead ends] and
-- Note [Precise exceptions and strictness analysis]).
-- This would cause dead code elimination to discard the continuation of the
-- catch# call, among other things. This first came up in #11555.
--
-- Hence catch# uses lazyApply1Dmd in order /not/ to forward the dead-end flag
-- from `act`. (This is a bit brutal, but the language of strictness types is
-- not expressive enough to give it a more precise semantics that is still
-- sound.)
-- For perf reasons we often (but not always) choose to use a wrapper around
-- catch# that is head-strict in `act`: GHC.IO.catchException.
--
-- A similar caveat applies to prompt#, which can be seen as a
-- generalisation of catch# as explained in GHC.Prim#continuations#.
-- The reason is that even if `act` appears dead-ending (e.g., looping)
-- `prompt# tag ma s` might return alright due to a (higher-order) use of
-- `control0#` in `act`. This came up in #25439.
primop CatchOp "catch#" GenPrimOp
(State# RealWorld -> (# State# RealWorld, o #) )
......@@ -2555,7 +2590,7 @@ primop CatchOp "catch#" GenPrimOp
strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd
, lazyApply2Dmd
, topDmd] topDiv }
-- See Note [Strictness for mask/unmask/catch]
-- See Note [Strictness for catch-style primops]
out_of_line = True
has_side_effects = True
......@@ -2620,7 +2655,7 @@ primop MaskAsyncExceptionsOp "maskAsyncExceptions#" GenPrimOp
in continuation-style primops\" for details. }
with
strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv }
-- See Note [Strictness for mask/unmask/catch]
-- See Note [Strict IO wrappers]
out_of_line = True
has_side_effects = True
......@@ -2635,6 +2670,7 @@ primop MaskUninterruptibleOp "maskUninterruptible#" GenPrimOp
in continuation-style primops\" for details. }
with
strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv }
-- See Note [Strict IO wrappers]
out_of_line = True
has_side_effects = True
......@@ -2649,7 +2685,7 @@ primop UnmaskAsyncExceptionsOp "unmaskAsyncExceptions#" GenPrimOp
in continuation-style primops\" for details. }
with
strictness = { \ _arity -> mkClosedDmdSig [strictOnceApply1Dmd,topDmd] topDiv }
-- See Note [Strictness for mask/unmask/catch]
-- See Note [Strict IO wrappers]
out_of_line = True
has_side_effects = True
......@@ -2835,7 +2871,8 @@ primop PromptOp "prompt#" GenPrimOp
-> State# RealWorld -> (# State# RealWorld, a #)
{ See "GHC.Prim#continuations". }
with
strictness = { \ _arity -> mkClosedDmdSig [topDmd, strictOnceApply1Dmd, topDmd] topDiv }
strictness = { \ _arity -> mkClosedDmdSig [topDmd, lazyApply1Dmd, topDmd] topDiv }
-- See Note [Strictness for catch-style primops]
out_of_line = True
has_side_effects = True
......@@ -2862,7 +2899,7 @@ primop AtomicallyOp "atomically#" GenPrimOp
-> State# RealWorld -> (# State# RealWorld, v #)
with
strictness = { \ _arity -> mkClosedDmdSig [strictManyApply1Dmd,topDmd] topDiv }
-- See Note [Strictness for mask/unmask/catch]
-- See Note [Strict IO wrappers]
out_of_line = True
has_side_effects = True
......@@ -2891,7 +2928,7 @@ primop CatchRetryOp "catchRetry#" GenPrimOp
strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd
, lazyApply1Dmd
, topDmd ] topDiv }
-- See Note [Strictness for mask/unmask/catch]
-- See Note [Strictness for catch-style primops]
out_of_line = True
has_side_effects = True
......@@ -2903,7 +2940,7 @@ primop CatchSTMOp "catchSTM#" GenPrimOp
strictness = { \ _arity -> mkClosedDmdSig [ lazyApply1Dmd
, lazyApply2Dmd
, topDmd ] topDiv }
-- See Note [Strictness for mask/unmask/catch]
-- See Note [Strictness for catch-style primops]
out_of_line = True
has_side_effects = True
......@@ -3578,6 +3615,7 @@ primop KeepAliveOp "keepAlive#" GenPrimOp
with
out_of_line = True
strictness = { \ _arity -> mkClosedDmdSig [topDmd, topDmd, strictOnceApply1Dmd] topDiv }
-- See Note [Strict IO wrappers]
------------------------------------------------------------------------
......@@ -3818,10 +3856,25 @@ pseudoop "coerce"
more complicated settings, e.g. converting a list of newtypes to a list of
concrete types.
When used in conversions involving a newtype wrapper,
make sure the newtype constructor is in scope.
This function is representation-polymorphic, but the
'RuntimeRep' type argument is marked as 'Inferred', meaning
that it is not available for visible type application. This means
the typechecker will accept @'coerce' @'Int' @Age 42@.
the typechecker will accept @'coerce' \@'Int' \@Age 42@.
=== __Examples__
>>> newtype TTL = TTL Int deriving (Eq, Ord, Show)
>>> newtype Age = Age Int deriving (Eq, Ord, Show)
>>> coerce (Age 42) :: TTL
TTL 42
>>> coerce (+ (1 :: Int)) (Age 42) :: TTL
TTL 43
>>> coerce (map (+ (1 :: Int))) [Age 42, Age 24] :: [TTL]
[TTL 43,TTL 25]
}
------------------------------------------------------------------------
......
......@@ -22,12 +22,11 @@ import GHC.ByteCode.InfoTable
import GHC.ByteCode.Types
import GHCi.RemoteTypes
import GHC.Runtime.Interpreter
import GHC.Runtime.Heap.Layout hiding ( WordOff )
import GHC.Runtime.Heap.Layout ( fromStgWord, StgWord )
import GHC.Types.Name
import GHC.Types.Name.Set
import GHC.Types.Literal
import GHC.Types.Unique
import GHC.Types.Unique.DSet
import GHC.Utils.Outputable
......@@ -199,8 +198,8 @@ assembleBCO platform (ProtoBCO { protoBCOName = nm
-- this BCO to be long.
(n_insns0, lbl_map0) = inspectAsm platform False initial_offset asm
((n_insns, lbl_map), long_jumps)
| isLarge (fromIntegral $ Map.size lbl_map0)
|| isLarge n_insns0
| isLargeW (fromIntegral $ Map.size lbl_map0)
|| isLargeW n_insns0
= (inspectAsm platform True initial_offset asm, True)
| otherwise = ((n_insns0, lbl_map0), False)
......@@ -229,7 +228,7 @@ assembleBCO platform (ProtoBCO { protoBCOName = nm
return ul_bco
mkBitmapArray :: Word16 -> [StgWord] -> UArray Int Word64
mkBitmapArray :: Word -> [StgWord] -> UArray Int Word64
-- Here the return type must be an array of Words, not StgWords,
-- because the underlying ByteArray# will end up as a component
-- of a BCO object.
......@@ -244,9 +243,21 @@ type AsmState = (SizedSeq Word16,
data Operand
= Op Word
| IOp Int
| SmallOp Word16
| LabelOp LocalLabel
-- (unused) | LargeOp Word
wOp :: WordOff -> Operand
wOp = Op . fromIntegral
bOp :: ByteOff -> Operand
bOp = Op . fromIntegral
truncHalfWord :: Platform -> HalfWord -> Operand
truncHalfWord platform w = case platformWordSize platform of
PW4 | w <= 65535 -> Op (fromIntegral w)
PW8 | w <= 4294967295 -> Op (fromIntegral w)
_ -> pprPanic "GHC.ByteCode.Asm.truncHalfWord" (ppr w)
data Assembler a
= AllocPtr (IO BCOPtr) (Word -> Assembler a)
......@@ -287,9 +298,9 @@ type LabelEnv = LocalLabel -> Word
largeOp :: Bool -> Operand -> Bool
largeOp long_jumps op = case op of
SmallOp _ -> False
Op w -> isLarge w
Op w -> isLargeW w
IOp i -> isLargeI i
LabelOp _ -> long_jumps
-- LargeOp _ -> True
runAsm :: Platform -> Bool -> LabelEnv -> Assembler a -> StateT AsmState IO a
runAsm platform long_jumps e = go
......@@ -308,15 +319,15 @@ runAsm platform long_jumps e = go
go $ k w
go (AllocLabel _ k) = go k
go (Emit w ops k) = do
let largeOps = any (largeOp long_jumps) ops
let largeArgs = any (largeOp long_jumps) ops
opcode
| largeOps = largeArgInstr w
| largeArgs = largeArgInstr w
| otherwise = w
words = concatMap expand ops
expand (SmallOp w) = [w]
expand (LabelOp w) = expand (Op (e w))
expand (Op w) = if largeOps then largeArg platform (fromIntegral w) else [fromIntegral w]
-- expand (LargeOp w) = largeArg platform w
expand (Op w) = if largeArgs then largeArg platform (fromIntegral w) else [fromIntegral w]
expand (IOp i) = if largeArgs then largeArg platform (fromIntegral i) else [fromIntegral i]
state $ \(st_i0,st_l0,st_p0) ->
let st_i1 = addListToSS st_i0 (opcode : words)
in ((), (st_i1,st_l0,st_p0))
......@@ -350,7 +361,7 @@ inspectAsm platform long_jumps initial_offset
count (SmallOp _) = 1
count (LabelOp _) = count (Op 0)
count (Op _) = if largeOps then largeArg16s platform else 1
-- count (LargeOp _) = largeArg16s platform
count (IOp _) = if largeOps then largeArg16s platform else 1
-- Bring in all the bci_ bytecode constants.
#include "Bytecodes.h"
......@@ -379,15 +390,15 @@ assembleI :: Platform
-> Assembler ()
assembleI platform i = case i of
STKCHECK n -> emit bci_STKCHECK [Op n]
PUSH_L o1 -> emit bci_PUSH_L [SmallOp o1]
PUSH_LL o1 o2 -> emit bci_PUSH_LL [SmallOp o1, SmallOp o2]
PUSH_LLL o1 o2 o3 -> emit bci_PUSH_LLL [SmallOp o1, SmallOp o2, SmallOp o3]
PUSH8 o1 -> emit bci_PUSH8 [SmallOp o1]
PUSH16 o1 -> emit bci_PUSH16 [SmallOp o1]
PUSH32 o1 -> emit bci_PUSH32 [SmallOp o1]
PUSH8_W o1 -> emit bci_PUSH8_W [SmallOp o1]
PUSH16_W o1 -> emit bci_PUSH16_W [SmallOp o1]
PUSH32_W o1 -> emit bci_PUSH32_W [SmallOp o1]
PUSH_L o1 -> emit bci_PUSH_L [wOp o1]
PUSH_LL o1 o2 -> emit bci_PUSH_LL [wOp o1, wOp o2]
PUSH_LLL o1 o2 o3 -> emit bci_PUSH_LLL [wOp o1, wOp o2, wOp o3]
PUSH8 o1 -> emit bci_PUSH8 [bOp o1]
PUSH16 o1 -> emit bci_PUSH16 [bOp o1]
PUSH32 o1 -> emit bci_PUSH32 [bOp o1]
PUSH8_W o1 -> emit bci_PUSH8_W [bOp o1]
PUSH16_W o1 -> emit bci_PUSH16_W [bOp o1]
PUSH32_W o1 -> emit bci_PUSH32_W [bOp o1]
PUSH_G nm -> do p <- ptr (BCOPtrName nm)
emit bci_PUSH_G [Op p]
PUSH_PRIMOP op -> do p <- ptr (BCOPtrPrimOp op)
......@@ -419,7 +430,7 @@ assembleI platform i = case i of
PUSH_UBX32 lit -> do np <- literal lit
emit bci_PUSH_UBX32 [Op np]
PUSH_UBX lit nws -> do np <- literal lit
emit bci_PUSH_UBX [Op np, SmallOp nws]
emit bci_PUSH_UBX [Op np, wOp nws]
-- see Note [Generating code for top-level string literal bindings] in GHC.StgToByteCode
PUSH_ADDR nm -> do np <- lit [BCONPtrAddr nm]
......@@ -437,15 +448,15 @@ assembleI platform i = case i of
PUSH_APPLY_PPPPP -> emit bci_PUSH_APPLY_PPPPP []
PUSH_APPLY_PPPPPP -> emit bci_PUSH_APPLY_PPPPPP []
SLIDE n by -> emit bci_SLIDE [SmallOp n, SmallOp by]
ALLOC_AP n -> emit bci_ALLOC_AP [SmallOp n]
ALLOC_AP_NOUPD n -> emit bci_ALLOC_AP_NOUPD [SmallOp n]
ALLOC_PAP arity n -> emit bci_ALLOC_PAP [SmallOp arity, SmallOp n]
MKAP off sz -> emit bci_MKAP [SmallOp off, SmallOp sz]
MKPAP off sz -> emit bci_MKPAP [SmallOp off, SmallOp sz]
UNPACK n -> emit bci_UNPACK [SmallOp n]
SLIDE n by -> emit bci_SLIDE [wOp n, wOp by]
ALLOC_AP n -> emit bci_ALLOC_AP [truncHalfWord platform n]
ALLOC_AP_NOUPD n -> emit bci_ALLOC_AP_NOUPD [truncHalfWord platform n]
ALLOC_PAP arity n -> emit bci_ALLOC_PAP [truncHalfWord platform arity, truncHalfWord platform n]
MKAP off sz -> emit bci_MKAP [wOp off, truncHalfWord platform sz]
MKPAP off sz -> emit bci_MKPAP [wOp off, truncHalfWord platform sz]
UNPACK n -> emit bci_UNPACK [wOp n]
PACK dcon sz -> do itbl_no <- lit [BCONPtrItbl (getName dcon)]
emit bci_PACK [Op itbl_no, SmallOp sz]
emit bci_PACK [Op itbl_no, wOp sz]
LABEL lbl -> label lbl
TESTLT_I i l -> do np <- int i
emit bci_TESTLT_I [Op np, LabelOp l]
......@@ -498,19 +509,19 @@ assembleI platform i = case i of
TESTLT_P i l -> emit bci_TESTLT_P [SmallOp i, LabelOp l]
TESTEQ_P i l -> emit bci_TESTEQ_P [SmallOp i, LabelOp l]
CASEFAIL -> emit bci_CASEFAIL []
SWIZZLE stkoff n -> emit bci_SWIZZLE [SmallOp stkoff, SmallOp n]
SWIZZLE stkoff n -> emit bci_SWIZZLE [wOp stkoff, IOp n]
JMP l -> emit bci_JMP [LabelOp l]
ENTER -> emit bci_ENTER []
RETURN rep -> emit (return_non_tuple rep) []
RETURN_TUPLE -> emit bci_RETURN_T []
CCALL off m_addr i -> do np <- addr m_addr
emit bci_CCALL [SmallOp off, Op np, SmallOp i]
emit bci_CCALL [wOp off, Op np, SmallOp i]
PRIMCALL -> emit bci_PRIMCALL []
BRK_FUN index uniq cc -> do p1 <- ptr BCOPtrBreakArray
q <- int (getKey uniq)
BRK_FUN index mod cc -> do p1 <- ptr BCOPtrBreakArray
m <- addr mod
np <- addr cc
emit bci_BRK_FUN [Op p1, SmallOp index,
Op q, Op np]
Op m, Op np]
where
literal (LitLabel fs (Just sz) _)
......@@ -556,8 +567,11 @@ assembleI platform i = case i of
words ws = lit (map BCONPtrWord ws)
word w = words [w]
isLarge :: Word -> Bool
isLarge n = n > 65535
isLargeW :: Word -> Bool
isLargeW n = n > 65535
isLargeI :: Int -> Bool
isLargeI n = n > 32767 || n < -32768
push_alts :: ArgRep -> Word16
push_alts V = bci_PUSH_ALTS_V
......
......@@ -19,11 +19,10 @@ import GHCi.FFI (C_ffi_cif)
import GHC.StgToCmm.Layout ( ArgRep(..) )
import GHC.Utils.Outputable
import GHC.Types.Name
import GHC.Types.Unique
import GHC.Types.Literal
import GHC.Core.DataCon
import GHC.Builtin.PrimOps
import GHC.Runtime.Heap.Layout
import GHC.Runtime.Heap.Layout ( StgWord )
import Data.Int
import Data.Word
......@@ -31,6 +30,7 @@ import Data.Word
import GHC.Stack.CCS (CostCentre)
import GHC.Stg.Syntax
import Language.Haskell.Syntax.Module.Name (ModuleName)
-- ----------------------------------------------------------------------------
-- Bytecode instructions
......@@ -41,7 +41,7 @@ data ProtoBCO a
protoBCOInstrs :: [BCInstr], -- instrs
-- arity and GC info
protoBCOBitmap :: [StgWord],
protoBCOBitmapSize :: Word16,
protoBCOBitmapSize :: Word,
protoBCOArity :: Int,
-- what the BCO came from, for debugging only
protoBCOExpr :: Either [CgStgAlt] CgStgRhs,
......@@ -58,18 +58,18 @@ instance Outputable LocalLabel where
data BCInstr
-- Messing with the stack
= STKCHECK Word
= STKCHECK !Word
-- Push locals (existing bits of the stack)
| PUSH_L !Word16{-offset-}
| PUSH_LL !Word16 !Word16{-2 offsets-}
| PUSH_LLL !Word16 !Word16 !Word16{-3 offsets-}
| PUSH_L !WordOff{-offset-}
| PUSH_LL !WordOff !WordOff{-2 offsets-}
| PUSH_LLL !WordOff !WordOff !WordOff{-3 offsets-}
-- Push the specified local as a 8, 16, 32 bit value onto the stack. (i.e.,
-- the stack will grow by 8, 16 or 32 bits)
| PUSH8 !Word16
| PUSH16 !Word16
| PUSH32 !Word16
| PUSH8 !ByteOff
| PUSH16 !ByteOff
| PUSH32 !ByteOff
-- Push the specified local as a 8, 16, 32 bit value onto the stack, but the
-- value will take the whole word on the stack (i.e., the stack will grow by
......@@ -78,11 +78,11 @@ data BCInstr
-- Currently we expect all values on the stack to take full words, except for
-- the ones used for PACK (i.e., actually constructing new data types, in
-- which case we use PUSH{8,16,32})
| PUSH8_W !Word16
| PUSH16_W !Word16
| PUSH32_W !Word16
| PUSH8_W !ByteOff
| PUSH16_W !ByteOff
| PUSH32_W !ByteOff
-- Push a ptr (these all map to PUSH_G really)
-- Push a (heap) ptr (these all map to PUSH_G really)
| PUSH_G Name
| PUSH_PRIMOP PrimOp
| PUSH_BCO (ProtoBCO Name)
......@@ -102,8 +102,8 @@ data BCInstr
| PUSH_UBX8 Literal
| PUSH_UBX16 Literal
| PUSH_UBX32 Literal
| PUSH_UBX Literal Word16
-- push this int/float/double/addr, on the stack. Word16
| PUSH_UBX Literal !WordOff
-- push this int/float/double/addr, on the stack. Word
-- is # of words to copy from literal pool. Eitherness reflects
-- the difficulty of dealing with MachAddr here, mostly due to
-- the excessive (and unnecessary) restrictions imposed by the
......@@ -129,58 +129,61 @@ data BCInstr
| PUSH_APPLY_PPPPP
| PUSH_APPLY_PPPPPP
| SLIDE Word16{-this many-} Word16{-down by this much-}
| SLIDE !WordOff{-this many-} !WordOff{-down by this much-}
-- To do with the heap
| ALLOC_AP !Word16 -- make an AP with this many payload words
| ALLOC_AP_NOUPD !Word16 -- make an AP_NOUPD with this many payload words
| ALLOC_PAP !Word16 !Word16 -- make a PAP with this arity / payload words
| MKAP !Word16{-ptr to AP is this far down stack-} !Word16{-number of words-}
| MKPAP !Word16{-ptr to PAP is this far down stack-} !Word16{-number of words-}
| UNPACK !Word16 -- unpack N words from t.o.s Constr
| PACK DataCon !Word16
| ALLOC_AP !HalfWord {- make an AP with this many payload words.
HalfWord matches the size of the n_args field in StgAP,
make sure that we handle truncation when generating
bytecode using this HalfWord type here -}
| ALLOC_AP_NOUPD !HalfWord -- make an AP_NOUPD with this many payload words
| ALLOC_PAP !HalfWord !HalfWord -- make a PAP with this arity / payload words
| MKAP !WordOff{-ptr to AP is this far down stack-} !HalfWord{-number of words-}
| MKPAP !WordOff{-ptr to PAP is this far down stack-} !HalfWord{-number of words-}
| UNPACK !WordOff -- unpack N words from t.o.s Constr
| PACK DataCon !WordOff
-- after assembly, the DataCon is an index into the
-- itbl array
-- For doing case trees
| LABEL LocalLabel
| TESTLT_I Int LocalLabel
| TESTEQ_I Int LocalLabel
| TESTLT_W Word LocalLabel
| TESTEQ_W Word LocalLabel
| TESTLT_I64 Int64 LocalLabel
| TESTEQ_I64 Int64 LocalLabel
| TESTLT_I32 Int32 LocalLabel
| TESTEQ_I32 Int32 LocalLabel
| TESTLT_I16 Int16 LocalLabel
| TESTEQ_I16 Int16 LocalLabel
| TESTLT_I8 Int8 LocalLabel
| TESTEQ_I8 Int16 LocalLabel
| TESTLT_W64 Word64 LocalLabel
| TESTEQ_W64 Word64 LocalLabel
| TESTLT_W32 Word32 LocalLabel
| TESTEQ_W32 Word32 LocalLabel
| TESTLT_W16 Word16 LocalLabel
| TESTEQ_W16 Word16 LocalLabel
| TESTLT_W8 Word8 LocalLabel
| TESTEQ_W8 Word8 LocalLabel
| TESTLT_F Float LocalLabel
| TESTEQ_F Float LocalLabel
| TESTLT_D Double LocalLabel
| TESTEQ_D Double LocalLabel
| TESTLT_I !Int LocalLabel
| TESTEQ_I !Int LocalLabel
| TESTLT_W !Word LocalLabel
| TESTEQ_W !Word LocalLabel
| TESTLT_I64 !Int64 LocalLabel
| TESTEQ_I64 !Int64 LocalLabel
| TESTLT_I32 !Int32 LocalLabel
| TESTEQ_I32 !Int32 LocalLabel
| TESTLT_I16 !Int16 LocalLabel
| TESTEQ_I16 !Int16 LocalLabel
| TESTLT_I8 !Int8 LocalLabel
| TESTEQ_I8 !Int16 LocalLabel
| TESTLT_W64 !Word64 LocalLabel
| TESTEQ_W64 !Word64 LocalLabel
| TESTLT_W32 !Word32 LocalLabel
| TESTEQ_W32 !Word32 LocalLabel
| TESTLT_W16 !Word16 LocalLabel
| TESTEQ_W16 !Word16 LocalLabel
| TESTLT_W8 !Word8 LocalLabel
| TESTEQ_W8 !Word8 LocalLabel
| TESTLT_F !Float LocalLabel
| TESTEQ_F !Float LocalLabel
| TESTLT_D !Double LocalLabel
| TESTEQ_D !Double LocalLabel
-- The Word16 value is a constructor number and therefore
-- stored in the insn stream rather than as an offset into
-- the literal pool.
| TESTLT_P Word16 LocalLabel
| TESTEQ_P Word16 LocalLabel
| TESTLT_P !Word16 LocalLabel
| TESTEQ_P !Word16 LocalLabel
| CASEFAIL
| JMP LocalLabel
-- For doing calls to C (via glue code generated by libffi)
| CCALL Word16 -- stack frame size
| CCALL !WordOff -- stack frame size
(RemotePtr C_ffi_cif) -- addr of the glue code
Word16 -- flags.
!Word16 -- flags.
--
-- 0x1: call is interruptible
-- 0x2: call is unsafe
......@@ -191,8 +194,8 @@ data BCInstr
| PRIMCALL
-- For doing magic ByteArray passing to foreign calls
| SWIZZLE Word16 -- to the ptr N words down the stack,
Word16 -- add M (interpreted as a signed 16-bit entity)
| SWIZZLE !WordOff -- to the ptr N words down the stack,
!Int -- add M
-- To Infinity And Beyond
| ENTER
......@@ -202,7 +205,7 @@ data BCInstr
-- Note [unboxed tuple bytecodes and tuple_BCO] in GHC.StgToByteCode
-- Breakpoints
| BRK_FUN Word16 Unique (RemotePtr CostCentre)
| BRK_FUN !Word16 (RemotePtr ModuleName) (RemotePtr CostCentre)
-- -----------------------------------------------------------------------------
-- Printing bytecode instructions
......@@ -353,11 +356,7 @@ instance Outputable BCInstr where
ppr ENTER = text "ENTER"
ppr (RETURN pk) = text "RETURN " <+> ppr pk
ppr (RETURN_TUPLE) = text "RETURN_TUPLE"
ppr (BRK_FUN index uniq _cc) = text "BRK_FUN" <+> ppr index <+> mb_uniq <+> text "<cc>"
where mb_uniq = sdocOption sdocSuppressUniques $ \case
True -> text "<uniq>"
False -> ppr uniq
ppr (BRK_FUN index _mod_name _cc) = text "BRK_FUN" <+> ppr index <+> text "<module>" <+> text "<cc>"
-- -----------------------------------------------------------------------------
......
......@@ -25,6 +25,7 @@ import GHCi.ResolvedBCO
import GHCi.BreakArray
import GHC.Builtin.PrimOps
import GHC.Builtin.PrimOps.Ids
import GHC.Builtin.Names
import GHC.Unit.Types
......@@ -40,6 +41,8 @@ import GHC.Utils.Outputable
import GHC.Types.Name
import GHC.Types.Name.Env
import qualified GHC.Types.Id as Id
import GHC.Types.Unique.DFM
import Language.Haskell.Syntax.Module.Name
......@@ -54,32 +57,33 @@ import GHC.Exts
linkBCO
:: Interp
-> PkgsLoaded
-> LinkerEnv
-> NameEnv Int
-> RemoteRef BreakArray
-> UnlinkedBCO
-> IO ResolvedBCO
linkBCO interp le bco_ix breakarray
linkBCO interp pkgs_loaded le bco_ix breakarray
(UnlinkedBCO _ arity insns bitmap lits0 ptrs0) = do
-- fromIntegral Word -> Word64 should be a no op if Word is Word64
-- otherwise it will result in a cast to longlong on 32bit systems.
lits <- mapM (fmap fromIntegral . lookupLiteral interp le) (ssElts lits0)
ptrs <- mapM (resolvePtr interp le bco_ix breakarray) (ssElts ptrs0)
lits <- mapM (fmap fromIntegral . lookupLiteral interp pkgs_loaded le) (ssElts lits0)
ptrs <- mapM (resolvePtr interp pkgs_loaded le bco_ix breakarray) (ssElts ptrs0)
return (ResolvedBCO isLittleEndian arity insns bitmap
(listArray (0, fromIntegral (sizeSS lits0)-1) lits)
(addListToSS emptySS ptrs))
lookupLiteral :: Interp -> LinkerEnv -> BCONPtr -> IO Word
lookupLiteral interp le ptr = case ptr of
lookupLiteral :: Interp -> PkgsLoaded -> LinkerEnv -> BCONPtr -> IO Word
lookupLiteral interp pkgs_loaded le ptr = case ptr of
BCONPtrWord lit -> return lit
BCONPtrLbl sym -> do
Ptr a# <- lookupStaticPtr interp sym
return (W# (int2Word# (addr2Int# a#)))
BCONPtrItbl nm -> do
Ptr a# <- lookupIE interp (itbl_env le) nm
Ptr a# <- lookupIE interp pkgs_loaded (itbl_env le) nm
return (W# (int2Word# (addr2Int# a#)))
BCONPtrAddr nm -> do
Ptr a# <- lookupAddr interp (addr_env le) nm
Ptr a# <- lookupAddr interp pkgs_loaded (addr_env le) nm
return (W# (int2Word# (addr2Int# a#)))
BCONPtrStr _ ->
-- should be eliminated during assembleBCOs
......@@ -93,19 +97,19 @@ lookupStaticPtr interp addr_of_label_string = do
Nothing -> linkFail "GHC.ByteCode.Linker: can't find label"
(unpackFS addr_of_label_string)
lookupIE :: Interp -> ItblEnv -> Name -> IO (Ptr ())
lookupIE interp ie con_nm =
lookupIE :: Interp -> PkgsLoaded -> ItblEnv -> Name -> IO (Ptr ())
lookupIE interp pkgs_loaded ie con_nm =
case lookupNameEnv ie con_nm of
Just (_, ItblPtr a) -> return (fromRemotePtr (castRemotePtr a))
Nothing -> do -- try looking up in the object files.
let sym_to_find1 = nameToCLabel con_nm "con_info"
m <- lookupSymbol interp sym_to_find1
m <- lookupHsSymbol interp pkgs_loaded con_nm "con_info"
case m of
Just addr -> return addr
Nothing
-> do -- perhaps a nullary constructor?
let sym_to_find2 = nameToCLabel con_nm "static_info"
n <- lookupSymbol interp sym_to_find2
n <- lookupHsSymbol interp pkgs_loaded con_nm "static_info"
case n of
Just addr -> return addr
Nothing -> linkFail "GHC.ByteCode.Linker.lookupIE"
......@@ -113,35 +117,36 @@ lookupIE interp ie con_nm =
unpackFS sym_to_find2)
-- see Note [Generating code for top-level string literal bindings] in GHC.StgToByteCode
lookupAddr :: Interp -> AddrEnv -> Name -> IO (Ptr ())
lookupAddr interp ae addr_nm = do
lookupAddr :: Interp -> PkgsLoaded -> AddrEnv -> Name -> IO (Ptr ())
lookupAddr interp pkgs_loaded ae addr_nm = do
case lookupNameEnv ae addr_nm of
Just (_, AddrPtr ptr) -> return (fromRemotePtr ptr)
Nothing -> do -- try looking up in the object files.
let sym_to_find = nameToCLabel addr_nm "bytes"
-- see Note [Bytes label] in GHC.Cmm.CLabel
m <- lookupSymbol interp sym_to_find
m <- lookupHsSymbol interp pkgs_loaded addr_nm "bytes"
case m of
Just ptr -> return ptr
Nothing -> linkFail "GHC.ByteCode.Linker.lookupAddr"
(unpackFS sym_to_find)
lookupPrimOp :: Interp -> PrimOp -> IO (RemotePtr ())
lookupPrimOp interp primop = do
lookupPrimOp :: Interp -> PkgsLoaded -> PrimOp -> IO (RemotePtr ())
lookupPrimOp interp pkgs_loaded primop = do
let sym_to_find = primopToCLabel primop "closure"
m <- lookupSymbol interp (mkFastString sym_to_find)
m <- lookupHsSymbol interp pkgs_loaded (Id.idName $ primOpId primop) "closure"
case m of
Just p -> return (toRemotePtr p)
Nothing -> linkFail "GHC.ByteCode.Linker.lookupCE(primop)" sym_to_find
resolvePtr
:: Interp
-> PkgsLoaded
-> LinkerEnv
-> NameEnv Int
-> RemoteRef BreakArray
-> BCOPtr
-> IO ResolvedBCOPtr
resolvePtr interp le bco_ix breakarray ptr = case ptr of
resolvePtr interp pkgs_loaded le bco_ix breakarray ptr = case ptr of
BCOPtrName nm
| Just ix <- lookupNameEnv bco_ix nm
-> return (ResolvedBCORef ix) -- ref to another BCO in this group
......@@ -153,20 +158,42 @@ resolvePtr interp le bco_ix breakarray ptr = case ptr of
-> assertPpr (isExternalName nm) (ppr nm) $
do
let sym_to_find = nameToCLabel nm "closure"
m <- lookupSymbol interp sym_to_find
m <- lookupHsSymbol interp pkgs_loaded nm "closure"
case m of
Just p -> return (ResolvedBCOStaticPtr (toRemotePtr p))
Nothing -> linkFail "GHC.ByteCode.Linker.lookupCE" (unpackFS sym_to_find)
BCOPtrPrimOp op
-> ResolvedBCOStaticPtr <$> lookupPrimOp interp op
-> ResolvedBCOStaticPtr <$> lookupPrimOp interp pkgs_loaded op
BCOPtrBCO bco
-> ResolvedBCOPtrBCO <$> linkBCO interp le bco_ix breakarray bco
-> ResolvedBCOPtrBCO <$> linkBCO interp pkgs_loaded le bco_ix breakarray bco
BCOPtrBreakArray
-> return (ResolvedBCOPtrBreakArray breakarray)
-- | Look up the address of a Haskell symbol in the currently
-- loaded units.
--
-- See Note [Looking up symbols in the relevant objects].
lookupHsSymbol :: Interp -> PkgsLoaded -> Name -> String -> IO (Maybe (Ptr ()))
lookupHsSymbol interp pkgs_loaded nm sym_suffix = do
massertPpr (isExternalName nm) (ppr nm)
let sym_to_find = nameToCLabel nm sym_suffix
pkg_id = moduleUnitId $ nameModule nm
loaded_dlls = maybe [] loaded_pkg_hs_dlls $ lookupUDFM pkgs_loaded pkg_id
go (dll:dlls) = do
mb_ptr <- lookupSymbolInDLL interp dll sym_to_find
case mb_ptr of
Just ptr -> pure (Just ptr)
Nothing -> go dlls
go [] =
-- See Note [Symbols may not be found in pkgs_loaded] in GHC.Linker.Types
lookupSymbol interp sym_to_find
go loaded_dlls
linkFail :: String -> String -> IO a
linkFail who what
= throwGhcExceptionIO (ProgramError $
......
......@@ -11,7 +11,7 @@ module GHC.ByteCode.Types
, FFIInfo(..)
, RegBitmap(..)
, NativeCallType(..), NativeCallInfo(..), voidTupleReturnInfo, voidPrimCallInfo
, ByteOff(..), WordOff(..)
, ByteOff(..), WordOff(..), HalfWord(..)
, UnlinkedBCO(..), BCOPtr(..), BCONPtr(..)
, ItblEnv, ItblPtr(..)
, AddrEnv, AddrPtr(..)
......@@ -44,6 +44,7 @@ import qualified GHC.Exts.Heap as Heap
import GHC.Stack.CCS
import GHC.Cmm.Expr ( GlobalRegSet, emptyRegSet, regSetToList )
import GHC.Iface.Syntax
import Language.Haskell.Syntax.Module.Name (ModuleName)
-- -----------------------------------------------------------------------------
-- Compiled Byte Code
......@@ -79,6 +80,12 @@ newtype ByteOff = ByteOff Int
newtype WordOff = WordOff Int
deriving (Enum, Eq, Show, Integral, Num, Ord, Real, Outputable)
-- A type for values that are half the size of a word on the target
-- platform where the interpreter runs (which may be a different
-- wordsize than the compiler).
newtype HalfWord = HalfWord Word
deriving (Enum, Eq, Show, Integral, Num, Ord, Real, Outputable)
newtype RegBitmap = RegBitmap { unRegBitmap :: Word32 }
deriving (Enum, Eq, Show, Integral, Num, Ord, Real, Bits, FiniteBits, Outputable)
......@@ -188,7 +195,7 @@ instance NFData BCONPtr where
data CgBreakInfo
= CgBreakInfo
{ cgb_tyvars :: ![IfaceTvBndr] -- ^ Type variables in scope at the breakpoint
, cgb_vars :: ![Maybe (IfaceIdBndr, Word16)]
, cgb_vars :: ![Maybe (IfaceIdBndr, Word)]
, cgb_resty :: !IfaceType
}
-- See Note [Syncing breakpoint info] in GHC.Runtime.Eval
......@@ -236,6 +243,7 @@ data ModBreaks
-- ^ Array pointing to cost centre for each breakpoint
, modBreaks_breakInfo :: IntMap CgBreakInfo
-- ^ info about each breakpoint from the bytecode generator
, modBreaks_module :: RemotePtr ModuleName
}
seqModBreaks :: ModBreaks -> ()
......@@ -245,7 +253,8 @@ seqModBreaks ModBreaks{..} =
rnf modBreaks_vars `seq`
rnf modBreaks_decls `seq`
rnf modBreaks_ccs `seq`
rnf (fmap seqCgBreakInfo modBreaks_breakInfo)
rnf (fmap seqCgBreakInfo modBreaks_breakInfo) `seq`
rnf modBreaks_module
-- | Construct an empty ModBreaks
emptyModBreaks :: ModBreaks
......@@ -257,6 +266,7 @@ emptyModBreaks = ModBreaks
, modBreaks_decls = array (0,-1) []
, modBreaks_ccs = array (0,-1) []
, modBreaks_breakInfo = IntMap.empty
, modBreaks_module = toRemotePtr nullPtr
}
{-
......
......@@ -229,16 +229,15 @@ data CmmInfoTable
-- place to convey this information from the code generator to
-- where we build the static closures in
-- GHC.Cmm.Info.Build.doSRTs.
} deriving Eq
} deriving (Eq, Ord)
instance OutputableP Platform CmmInfoTable where
pdoc = pprInfoTable
data ProfilingInfo
= NoProfilingInfo
| ProfilingInfo ByteString ByteString -- closure_type, closure_desc
deriving Eq
deriving (Eq, Ord)
-----------------------------------------------------------------------------
-- Static Data
-----------------------------------------------------------------------------
......