snowleopard / hadrian

Hadrian: a new build system for the Glasgow Haskell Compiler. Now merged into the GHC tree!
https://gitlab.haskell.org/ghc/ghc/tree/master/hadrian
MIT License
208 stars 39 forks source link

bin/ vs lib/bin/ and other mismatches between hadrian and make #603

Open alpmestan opened 6 years ago

alpmestan commented 6 years ago

(I haven't found a better title so far, I'm all ears if you have a better one.)

The point of this issue is to collect/track all the "tension points" between the way hadrian does things and the way the make build system and all its infrastructure (general ghc usage, tests, nofib, ...) work. In particular, we have seen some issues due to moving some binaries out of lib/bin/ to bin/ (which is why we currently have exceptions in place for unlit and touchy, because we'd otherwise have to patch GHC to tell it to look for those binaries under bin/ when it doesn't see them under lib/bin/).

In https://github.com/snowleopard/hadrian/issues/592#issuecomment-388758755 I summed up why I think it's fine that we do things differently, and nobody has yelled at me so far so at least a few people agree with me on this, or are at least open to seeing where I'm offering to take this.

Please feel free to mention all those situations where something in the existing build system or in GHC itself has some expectation that hadrian does not match. We can then start addressing those issues one by one in a principled way and discuss the general direction we want to take with respect to layout of binaries, binary distributions, etc.

snowleopard commented 6 years ago

@alpmestan Great, thank you! I think the right directory is bin/lib, so I've edited the title. You might want to update your comment too.

alpmestan commented 6 years ago

No no, it is lib/bin.

$ ls _build/stage1/lib/bin
unlit 
$ tree -L 2 _build/stage1/
_build/stage1/
├── bin
│   ├── ghc
│   └── ghc-split
├── compiler
│   ├── build
│   └── setup-config
├── ghc
│   ├── build
│   └── setup-config
├── gmp
│   └── include
├── lib
│   ├── bin
│   ├── ghci-usage.txt
│   ├── ghc-usage.txt
│   ├── llvm-targets
│   ├── package.conf.d
│   ├── platformConstants
│   ├── settings
│   ├── template-hsc.h
│   └── x86_64-linux-ghc-8.5.20180509
├── libffi
│   └── build
├── libraries
│   ├── array
│   ├── base
│   ├── binary
│   ├── bytestring
│   ├── containers
│   ├── deepseq
│   ├── directory
│   ├── filepath
│   ├── ghc-boot
│   ├── ghc-boot-th
│   ├── ghci
│   ├── ghc-prim
│   ├── haskeline
│   ├── hpc
│   ├── integer-gmp
│   ├── mtl
│   ├── pretty
│   ├── process
│   ├── stm
│   ├── template-haskell
│   ├── terminfo
│   ├── time
│   ├── transformers
│   └── unix
├── rts
│   ├── build
│   └── setup-config
├── share
│   └── doc
└── utils
    └── unlit

44 directories, 11 files
snowleopard commented 6 years ago

@alpmestan Oh, I'm sorry! Edited the title back. Not sure why I keep confusing these directories.