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
640 results
Show changes
Commits on Source (10)
Showing
with 217 additions and 131 deletions
......@@ -659,22 +659,6 @@ validate-x86_64-linux-deb9-debug:
when: always
expire_in: 2 week
# Disabled to alleviate CI load
.validate-x86_64-linux-deb9-llvm:
extends: .build-x86_64-linux-deb9
stage: full-build
variables:
BUILD_FLAVOUR: perf-llvm
TEST_ENV: "x86_64-linux-deb9-llvm"
nightly-x86_64-linux-deb9-llvm:
<<: *nightly
extends: .build-x86_64-linux-deb9
stage: full-build
variables:
BUILD_FLAVOUR: perf-llvm
TEST_ENV: "x86_64-linux-deb9-llvm"
validate-x86_64-linux-deb9-integer-simple:
extends: .build-x86_64-linux-deb9
stage: full-build
......@@ -759,6 +743,23 @@ release-x86_64-linux-deb10-dwarf:
TEST_ENV: "x86_64-linux-deb10-dwarf"
BIN_DIST_PREP_TAR_COMP: "ghc-x86_64-deb10-linux-dwarf.tar.xz"
validate-x86_64-linux-deb10-llvm:
extends: .build-x86_64-linux-deb10
stage: full-build
rules:
- if: '$CI_MERGE_REQUEST_LABELS =~ /.*LLVM backend.*/'
variables:
BUILD_FLAVOUR: perf-llvm
TEST_ENV: "x86_64-linux-deb10-llvm"
nightly-x86_64-linux-deb10-llvm:
<<: *nightly
extends: .build-x86_64-linux-deb10
stage: full-build
variables:
BUILD_FLAVOUR: perf-llvm
TEST_ENV: "x86_64-linux-deb10-llvm"
#################################
# x86_64-linux-ubuntu 20.04
#################################
......
......@@ -476,13 +476,15 @@ ghcInternalFunctions :: LlvmM ()
ghcInternalFunctions = do
platform <- getPlatform
let w = llvmWord platform
cint = LMInt $ widthInBits $ cIntWidth platform
mk "memcmp" cint [i8Ptr, i8Ptr, w]
mk "memcpy" i8Ptr [i8Ptr, i8Ptr, w]
mk "memmove" i8Ptr [i8Ptr, i8Ptr, w]
mk "memset" i8Ptr [i8Ptr, w, w]
mk "newSpark" w [i8Ptr, i8Ptr]
where
mk n ret args = do
let n' = llvmDefLabel $ fsLit n
let n' = fsLit n
decl = LlvmFunctionDecl n' ExternallyVisible CC_Ccc ret
FixedArgs (tysToParams args) Nothing
renderLlvm $ ppLlvmFunctionDecl decl
......@@ -516,7 +518,10 @@ getGlobalPtr llvmLbl = do
let mkGlbVar lbl ty = LMGlobalVar lbl (LMPointer ty) Private Nothing Nothing
case m_ty of
-- Directly reference if we have seen it already
Just ty -> return $ mkGlbVar (llvmDefLabel llvmLbl) ty Global
Just ty -> do
if llvmLbl `elem` (map fsLit ["newSpark", "memmove", "memcpy", "memcmp", "memset"])
then return $ mkGlbVar (llvmLbl) ty Global
else return $ mkGlbVar (llvmDefLabel llvmLbl) ty Global
-- Otherwise use a forward alias of it
Nothing -> do
saveAlias llvmLbl
......
......@@ -63,7 +63,7 @@ Library
process >= 1 && < 1.7,
bytestring >= 0.9 && < 0.11,
binary == 0.8.*,
time >= 1.4 && < 1.10,
time >= 1.4 && < 1.12,
containers >= 0.6.2.1 && < 0.7,
array >= 0.1 && < 0.6,
filepath >= 1 && < 1.5,
......
......@@ -63,7 +63,7 @@ Executable ghc
ghci == @ProjectVersionMunged@,
haskeline == 0.8.*,
exceptions == 0.10.*,
time >= 1.8 && < 1.10
time >= 1.8 && < 1.12
CPP-Options: -DHAVE_INTERNAL_INTERPRETER
Other-Modules:
GHCi.Leak
......
......@@ -99,16 +99,6 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
<td>-O</td>
<td>-O2</td>
</tr>
<tr>
<th>prof</td>
<td>-O0<br>-H64m</td>
<td>-O0<br>-H64m</td>
<td></td>
<td>-O</td>
<td>-O2</td>
<td>-O</td>
<td>-O</td>
</tr>
<tr>
<th>bench</td>
<td>-O<br>-H64m</td>
......@@ -166,13 +156,66 @@ when compiling the `compiler` library, and `hsGhc` when compiling/linking the GH
</tr>
</table>
### LLVM variants
## Flavour transformers
In addition to the above, there are LLVM variants for the flavours `quick`,
`prof`, `perf` and `bench`, available by appending a `-llvm` suffix (i.e.,
`quick-llvm` for the LLVM variant of `quick`). These differ only in that there
is an additional `-fllvm` flag in `hsDefault` when the stage0 compiler is GHC.
See `src/Settings/Flavours/Llvm.hs` for details.
Each of the flavours described above is intended as a starting-point for
configuring your GHC build. In addition, Hadrian supports a number of "flavour
transformers" which modify the configuration in various ways.
These can be appended to the flavour name passed via the `--flavour`
command-line flag, separated by the `+` character. For instance,
```
hadrian --flavour=perf+thread_sanitizer
```
The supported transformers are listed below:
<table>
<tr>
<th>Transformer name</th>
<th>Effect</th>
</tr>
<tr>
<td><code>werror</code></td>
<td>Use the `-Werror` flag for all stage1+ compilation.</td>
</tr>
<tr>
<td><code>debug_info</code></td>
<td>Enable production of native debugging information (via GHC/GCC's `-g3`)
during stage1+ compilations.</td>
</tr>
<tr>
<td><code>ticky_ghc</code></td>
<td>Compile the GHC executable with Ticky-Ticky profiler support.</td>
</tr>
<tr>
<td><code>split_sections</code></td>
<td>Enable section splitting for all libraries (except for the GHC
library due to the long linking times that this causes).</td>
</tr>
<tr>
<td><code>thread_sanitizer</code></td>
<td>Build the runtime system with ThreadSanitizer support</td>
</tr>
<tr>
<td><code>llvm</code></td>
<td>Use GHC's LLVM backend (`-fllvm`) for all stage1+ compilation.</td>
</tr>
<tr>
<td><code>profiled_ghc</code></td>
<td>Build the GHC executable with cost-centre profiling support.
It is that you use this in conjunction with `no_dynamic_ghc` since
GHC does not It is support loading of profiled libraries with the
dynamically-linker.</td>
</tr>
<tr>
<td><code>no_dynamic_ghc</code></td>
<td>Linked GHC against the statically-linked RTS. This causes GHC to
default to loading static rather than dynamic library when,
e.g., loading libraries during TemplateHaskell evaluations.</td>
</tr>
</table>
## Ways
......@@ -184,7 +227,6 @@ information. The following table lists ways that are built in different flavours
<th rowspan="2">Flavour</th>
<th colspan="2">Library ways</th>
<th colspan="2">RTS ways</th>
<th colspan="2">Profiled GHC</th>
</tr>
<tr>
<th>stage0</th>
......@@ -195,7 +237,7 @@ information. The following table lists ways that are built in different flavours
<th>stage1+</th>
</tr>
<tr>
<th>default<br>perf<br>prof<br>devel1<br>devel2<br>perf-llvm<br>prof-llvm</td>
<th>default<br>perf<br>prof<br>devel1<br>devel2</td>
<td>vanilla</td>
<td>vanilla<br>profiling<br>dynamic</td>
<td>logging<br>debug<br>threaded<br>threadedDebug<br>threadedLogging
......@@ -208,11 +250,9 @@ information. The following table lists ways that are built in different flavours
<br>debugDynamic<br>threadedDynamic<br>threadedDebugDynamic
<br>loggingDynamic<br>threadedLoggingDynamic
</td>
<td>Only in<br>prof<br>flavour</td>
<td>Only in<br>prof<br>flavour</td>
</tr>
<tr>
<th>quick<br>quick-llvm<br>quick-validate<br>quick-debug</th>
<th>quick<br>quick-validate<br>quick-debug</th>
<td>vanilla</td>
<td>vanilla<br>dynamic</td>
<td>logging<br>debug<br>threaded<br>threadedDebug<br>threadedLogging
......@@ -223,8 +263,6 @@ information. The following table lists ways that are built in different flavours
<br>debugDynamic<br>threadedDynamic<br>threadedDebugDynamic
<br>loggingDynamic<br>threadedLoggingDynamic
</td>
<td>No</td>
<td>No</td>
</tr>
<tr>
<th>quickest<br>bench</th>
......@@ -232,7 +270,5 @@ information. The following table lists ways that are built in different flavours
<td>vanilla</td>
<td>vanilla<br>threaded</td>
<td>vanilla<br>threaded</td>
<td>No</td>
<td>No</td>
</tr>
</table>
......@@ -106,13 +106,10 @@ executable hadrian
, Settings.Flavours.Benchmark
, Settings.Flavours.Development
, Settings.Flavours.GhcInGhci
, Settings.Flavours.Llvm
, Settings.Flavours.Performance
, Settings.Flavours.Profiled
, Settings.Flavours.Quick
, Settings.Flavours.QuickCross
, Settings.Flavours.Quickest
, Settings.Flavours.ThreadSanitizer
, Settings.Flavours.Validate
, Settings.Packages
, Settings.Parser
......
module Flavour
( Flavour (..), werror
, DocTargets, DocTarget(..)
, parseFlavour
-- * Flavour transformers
, flavourTransformers
, addArgs
, splitSections, splitSectionsIf
, enableThreadSanitizer
, enableDebugInfo, enableTickyGhc
, viaLlvmBackend
, enableProfiledGhc
, disableDynamicGhcPrograms
) where
import Expression
import Data.Set (Set)
import Data.Map (Map)
import qualified Data.Map as M
import Packages
import Text.Parsec.Prim as P
import Text.Parsec.Combinator as P
import Text.Parsec.Char as P
-- Please update doc/{flavours.md, user-settings.md} when changing this file.
-- | 'Flavour' is a collection of build settings that fully define a GHC build.
-- Note the following type semantics:
......@@ -69,6 +80,58 @@ type DocTargets = Set DocTarget
data DocTarget = Haddocks | SphinxHTML | SphinxPDFs | SphinxMan | SphinxInfo
deriving (Eq, Ord, Show, Bounded, Enum)
flavourTransformers :: Map String (Flavour -> Flavour)
flavourTransformers = M.fromList
[ "werror" =: werror
, "debug_info" =: enableDebugInfo
, "ticky_ghc" =: enableTickyGhc
, "split_sections" =: splitSections
, "thread_sanitizer" =: enableThreadSanitizer
, "llvm" =: viaLlvmBackend
, "profiled_ghc" =: enableProfiledGhc
, "no_dynamic_ghc" =: disableDynamicGhcPrograms
]
where (=:) = (,)
type Parser = Parsec String ()
parseFlavour :: [Flavour] -- ^ base flavours
-> Map String (Flavour -> Flavour) -- ^ modifiers
-> String
-> Either String Flavour
parseFlavour baseFlavours transformers str =
case P.runParser parser () "" str of
Left perr -> Left $ unlines $
[ "error parsing flavour specifier: " ++ show perr
, ""
, "known flavours:"
] ++
[ " " ++ name f | f <- baseFlavours ] ++
[ ""
, "known flavour transformers:"
] ++
[ " " ++ nm | nm <- M.keys transformers ]
Right f -> Right f
where
parser :: Parser Flavour
parser = do
base <- baseFlavour
transs <- P.many flavourTrans
return $ foldr ($) base transs
baseFlavour :: Parser Flavour
baseFlavour =
P.choice [ f <$ P.try (P.string (name f))
| f <- baseFlavours
]
flavourTrans :: Parser (Flavour -> Flavour)
flavourTrans = do
void $ P.char '+'
P.choice [ trans <$ P.try (P.string nm)
| (nm, trans) <- M.toList transformers
]
-- | Add arguments to the 'args' of a 'Flavour'.
addArgs :: Args -> Flavour -> Flavour
addArgs args' fl = fl { args = args fl <> args' }
......@@ -96,7 +159,13 @@ enableTickyGhc =
[ builder (Ghc CompileHs) ? ticky
, builder (Ghc LinkHs) ? ticky
]
ticky = arg "-ticky" <> arg "-ticky-allocd"
ticky = mconcat
[ arg "-ticky"
, arg "-ticky-allocd"
-- You generally need STG dumps to interpret ticky profiles
, arg "-ddump-to-file"
, arg "-ddump-stg-final"
]
-- | Transform the input 'Flavour' so as to build with
-- @-split-sections@ whenever appropriate. You can
......@@ -128,3 +197,17 @@ enableThreadSanitizer = addArgs $ mconcat
, builder (Cabal Flags) ? arg "thread-sanitizer"
, builder RunTest ? arg "--config=have_thread_sanitizer=True"
]
-- | Use the LLVM backend in stages 1 and later.
viaLlvmBackend :: Flavour -> Flavour
viaLlvmBackend = addArgs $ notStage0 ? builder Ghc ? arg "-fllvm"
-- | Build the GHC executable with profiling enabled. It is also recommended
-- that you use this with @'dynamicGhcPrograms' = False@ since GHC does not
-- support loading of profiled libraries with the dynamically-linker.
enableProfiledGhc :: Flavour -> Flavour
enableProfiledGhc flavour = flavour { ghcProfiled = True }
-- | Disable 'dynamicGhcPrograms'.
disableDynamicGhcPrograms :: Flavour -> Flavour
disableDynamicGhcPrograms flavour = flavour { dynamicGhcPrograms = pure False }
......@@ -15,13 +15,10 @@ import {-# SOURCE #-} Settings.Default
import Settings.Flavours.Benchmark
import Settings.Flavours.Development
import Settings.Flavours.GhcInGhci
import Settings.Flavours.Llvm
import Settings.Flavours.Performance
import Settings.Flavours.Profiled
import Settings.Flavours.Quick
import Settings.Flavours.Quickest
import Settings.Flavours.QuickCross
import Settings.Flavours.ThreadSanitizer
import Settings.Flavours.Validate
import Control.Monad.Except
......@@ -54,13 +51,11 @@ stagePackages stage = do
hadrianFlavours :: [Flavour]
hadrianFlavours =
[ benchmarkFlavour, defaultFlavour, developmentFlavour Stage1
, developmentFlavour Stage2, performanceFlavour, profiledFlavour
, developmentFlavour Stage2, performanceFlavour
, quickFlavour, quickValidateFlavour, quickDebugFlavour
, quickestFlavour
, quickCrossFlavour, benchmarkLlvmFlavour
, performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour
, ghcInGhciFlavour, validateFlavour, slowValidateFlavour
, threadSanitizerFlavour ]
, quickCrossFlavour
, ghcInGhciFlavour, validateFlavour, slowValidateFlavour ]
-- | This action looks up a flavour with the name given on the
-- command line with @--flavour@, defaulting to 'userDefaultFlavour'
......@@ -75,11 +70,9 @@ flavour = do
let flavours = hadrianFlavours ++ userFlavours
(_settingErrs, tweak) = applySettings kvs
return $
case filter (\fl -> name fl == flavourName) flavours of
[] -> error $ "Unknown build flavour: " ++ flavourName
[f] -> tweak f
_ -> error $ "Multiple build flavours named " ++ flavourName
case parseFlavour flavours flavourTransformers flavourName of
Left err -> fail err
Right f -> return $ tweak f
-- TODO: switch to Set Package as the order of packages should not matter?
-- Otherwise we have to keep remembering to sort packages from time to time.
......
module Settings.Flavours.Llvm (
benchmarkLlvmFlavour,
performanceLlvmFlavour,
profiledLlvmFlavour,
quickLlvmFlavour,
) where
import Expression
import Flavour
import Settings.Flavours.Benchmark
import Settings.Flavours.Performance
import Settings.Flavours.Profiled
import Settings.Flavours.Quick
-- Please update doc/flavours.md when changing this file.
benchmarkLlvmFlavour, performanceLlvmFlavour, profiledLlvmFlavour, quickLlvmFlavour :: Flavour
benchmarkLlvmFlavour = mkLlvmFlavour benchmarkFlavour
performanceLlvmFlavour = mkLlvmFlavour performanceFlavour
profiledLlvmFlavour = mkLlvmFlavour profiledFlavour
quickLlvmFlavour = mkLlvmFlavour quickFlavour
-- | Turn a flavour into an LLVM flavour
mkLlvmFlavour :: Flavour -> Flavour
mkLlvmFlavour flav = flav
{ name = name flav ++ "-llvm"
, args = mconcat [ args flav
, builder Ghc ? arg "-fllvm" ]
}
module Settings.Flavours.Profiled (profiledFlavour) where
import Expression
import Flavour
import {-# SOURCE #-} Settings.Default
-- Please update doc/flavours.md when changing this file.
profiledFlavour :: Flavour
profiledFlavour = defaultFlavour
{ name = "prof"
, args = defaultBuilderArgs <> profiledArgs <> defaultPackageArgs
, ghcProfiled = True
, dynamicGhcPrograms = pure False }
profiledArgs :: Args
profiledArgs = sourceArgs SourceArgs
{ hsDefault = mconcat
[ pure ["-O0", "-H64m"]
]
, hsLibrary = notStage0 ? arg "-O"
, hsCompiler = mconcat [stage0 ? arg "-O2", notStage0 ? arg "-O"]
, hsGhc = arg "-O" }
module Settings.Flavours.ThreadSanitizer (threadSanitizerFlavour) where
import Flavour
import Settings.Flavours.Validate
threadSanitizerFlavour :: Flavour
threadSanitizerFlavour =
enableThreadSanitizer (validateFlavour
{ name = "thread-sanitizer" })
......@@ -18,8 +18,6 @@ extern "C" {
#include "HsFFI.h"
#include "rts/Time.h"
#include "rts/Types.h"
#include "rts/EventLogWriter.h"
/*
* Running the scheduler
......@@ -60,6 +58,9 @@ typedef struct CapabilityPublic_ {
StgRegTable r;
} CapabilityPublic;
/* N.B. this needs the Capability declaration above. */
#include "rts/EventLogWriter.h"
/* ----------------------------------------------------------------------------
RTS configuration settings, for passing to hs_init_ghc()
------------------------------------------------------------------------- */
......
......@@ -68,3 +68,8 @@ bool startEventLogging(const EventLogWriter *writer);
* Stop event logging and destroy the current EventLogWriter.
*/
void endEventLogging(void);
/*
* Flush the eventlog. cap can be NULL if one is not held.
*/
void flushEventLog(Capability **cap);
Subproject commit 5aea8a4b8463e1ae95272e190a1022764164294f
Subproject commit d30b8f3ec0b0873b9d2eb245afdd53fabacdb884
......@@ -37,6 +37,7 @@ module Debug.Trace (
-- $eventlog_tracing
traceEvent,
traceEventIO,
flushEventLog,
-- * Execution phase markers
-- $markers
......@@ -319,3 +320,11 @@ traceMarkerIO :: String -> IO ()
traceMarkerIO msg =
GHC.Foreign.withCString utf8 msg $ \(Ptr p) -> IO $ \s ->
case traceMarker# p s of s' -> (# s', () #)
-- | Immediately flush the event log, if enabled.
--
-- @since 4.15.0.0
flushEventLog :: IO ()
flushEventLog = c_flushEventLog nullPtr
foreign import ccall "flushEventLog" c_flushEventLog :: Ptr () -> IO ()
Subproject commit cecf363bc07004ad314e0297ce34ddba05031c0e
Subproject commit 0633b48b010093f64f98ee494265436e96456aed
{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples, GeneralizedNewtypeDeriving, DerivingStrategies #-}
{-# LANGUAGE BangPatterns, MagicHash, UnboxedTuples, GeneralizedNewtypeDeriving, DerivingStrategies, CPP #-}
{-# OPTIONS_GHC -O2 -funbox-strict-fields #-}
-- gross hack: we manuvered ourselves into a position where we can't boot GHC with a LLVM based GHC anymore.
-- LLVM based GHC's fail to compile memcmp ffi calls. These end up as memcmp$def in the llvm ir, however we
-- don't have any prototypes and subsequently the llvm toolchain chokes on them. Since 7fdcce6d, we use
-- ShortText for the package database. This however introduces this very module; which through inlining ends
-- up bringing memcmp_ByteArray from bytestring:Data.ByteString.Short.Internal into scope, which results in
-- the memcmp call we choke on.
--
-- The solution thusly is to force late binding via the linker instead of inlining when comping with the
-- bootstrap compiler. This will produce a slower (slightly less optimised) stage1 compiler only.
--
-- See issue 18857. hsyl20 deserves credit for coming up with the idea for the soltuion.
--
-- This can be removed when we exit the boot compiler window. Thus once we drop GHC-9.2 as boot compiler,
-- we can drop this code as well.
#if GHC_STAGE < 1
{-# OPTIONS_GHC -fignore-interface-pragmas #-}
#endif
-- |
-- An Unicode string for internal GHC use. Meant to replace String
-- in places where being a lazy linked is not very useful and a more
......
Subproject commit fecf0496a65c4be275d613eb0632fecd5a123b69
Subproject commit 59e6ba02f3fa5c8f4901b4ce21777c4a9beb14b6
Subproject commit 5319bed3b14c21de5410ead88ec8aaa838d7339c
Subproject commit c25d6a76702b454426e149fb590da5cb69f3bd0a
Subproject commit 8abd63ea234de02d2b3cb08b5098cd06c1a728f6
Subproject commit e079823775066bcab56b22842be6cce6e060fb9f