blob: 785b3a1a17b7c66f617dbce1b5e36dd53df9a811 [file] [log] [blame] [view] [raw]
RabsRincona0ec3452020-07-09 16:41:27 +02001This is an overview of what building and adding a compiler to the site looks like, using GCC as an example,
2 but note that the process is similar for all other types of compilers.
3
4* Build GCC versions with the relevant magic.
5 We build all our own GCCs using Docker from [this repo](https://github.com/compiler-explorer/gcc-builder)
6* For non-trunk builds we manually run the docker image.
7 For trunk dailies we have a [cron job](https://github.com/compiler-explorer/infra/blob/master/crontab.admin#L8)
8 that runs a [script](https://github.com/compiler-explorer/infra/blob/master/admin-daily-builds.sh) to build them.
9* Built tarballs are uploaded to S3,
10 and installed by our [custom tool](https://github.com/compiler-explorer/infra/blob/master/bin/lib/ce_install.py)
11 from a [YAML configuration file](https://github.com/compiler-explorer/infra/blob/master/bin/yaml/cpp.yaml)
12* The installation puts compilers on a shared NFS drive at `/opt/compiler-explorer/gcc-some-version/`
13* We then configure CE to look for the compiler
14 [here](https://github.com/compiler-explorer/compiler-explorer/blob/master/etc/config/c%2B%2B.amazon.properties#L9).
15* If we need to customise the way we execute the compiler and/or display the results,
16 then we can change the "[driver](https://github.com/compiler-explorer/compiler-explorer/tree/master/lib/compilers)"
17 for the compiler. Usually we can just override a few aspects of the driver,
18 relying on the defaults from the [base driver](https://github.com/compiler-explorer/compiler-explorer/blob/master/lib/base-compiler.js).
19* Any UI changes are a bit more work.
20
21More info still in [Adding a Compiler](https://github.com/compiler-explorer/compiler-explorer/blob/master/docs/AddingACompiler.md),
22 and if you can bear listening to Matt, here's [a talk](https://www.youtube.com/watch?v=kIoZDUd5DKw)
23 about some behind the scenes stuff, with [slides online](https://www.youtube.com/watch?v=kIoZDUd5DKw).