diff options
author | Matthew Sotoudeh <matthew@masot.net> | 2023-07-25 14:58:33 -0700 |
---|---|---|
committer | Matthew Sotoudeh <matthew@masot.net> | 2023-07-25 14:58:33 -0700 |
commit | 1d943da0cf9154e7ce78ce867cdbb91531c5d78e (patch) | |
tree | 40c5c6c3ba7fafa6567aa5b5aa216caecf3935fc /docs/DIETCC.txt |
initial dietc commit
Diffstat (limited to 'docs/DIETCC.txt')
-rw-r--r-- | docs/DIETCC.txt | 19 |
1 files changed, 19 insertions, 0 deletions
diff --git a/docs/DIETCC.txt b/docs/DIETCC.txt new file mode 100644 index 0000000..2b3762f --- /dev/null +++ b/docs/DIETCC.txt @@ -0,0 +1,19 @@ +The basic idea is to replace + + gcc ... file.c ... + +with + + gcc -E ... file.c ... -o preproc.c + dietc preproc.c > diet.c + pass1 diet.c > diet.c + pass2 diet.c > diet.c + ... + gcc ... diet.c ... + +To assist with this, we provide `scripts/dietcc`, which provides a drop-in +replacement for `gcc` that can run your patches. In your build scripts, simply +replace `gcc` with the path of `dietcc`. + +You can insert your own compilation pass into dietcc; read its Python source +for examples. |