# clm
`clm` is a make tool for [Clean][].
This repository is a fork of the [upstream][] found in classic Clean, with
additions for use in [Nitrile][]. Normally you should not need to use it
directly, but use the
[`clm`](https://clean-and-itasks.gitlab.io/nitrile/nitrile-yml/reference#buildscriptclm)
script in `nitrile.yml` instead.
`clm` is released in the `base-clm` package, which is included in `base`.
## Maintainer & license
This fork is maintained by [Camil Staps][].
The upstream is maintained by John van Groningen.
For license details, see the [LICENSE](/LICENSE) file.
[Camil Staps]: https://camilstaps.nl
[Clean]: https://clean-lang.org
[Nitrile]: https://clean-and-itasks.gitlab.io/nitrile
[upstream]: https://gitlab.science.ru.nl/clean-and-itasks/clm
# Changelog
### v1.6.0
- Feature: add `-gra`/`-Pgra` flag to enable generating `.r` annotations.
- Fix: enable optimizing uniqueness typing by default (`-ou` flag) to match
the documentation.
#### v1.5.2
- Fix: only compile main module with `-c` on Windows.
#### v1.5.1
- Fix: Revert ea82a8c3, "Compare file time with < instead of <=" as this could
result in a race condition.
### v1.5
- Feature: add `-aui` and `-naui` flags to enable or disable the allowance of
undecidable instances.
- Enhancement: recompile if an existing ABC file was compiled for a 32-bit
system and we are compiling for a 64-bit system, or vice versa.
- Fix: fix heap and stack sizes of more than 4GB for generated executable (on
linux 64 bit).
#### v1.4.2
- Fix: fix parallelization bug when `-j` is turned on.
#### v1.4.1
- Fix: fix when only one processor is used (on non-Windows systems).
### v1.4.0
- Feature: add `-j [n]` to parallelize compilation, ABC optimization, bytecode
generation, and code generation over processors (not on Windows).
- Change: remove use of `CLEANOPATH` environment variable. Rename
`CLEANABCPATH` to `CLM_ARTIFACTS_PATH`, and use this path for all generated
files (`.abc`, `.s`, `.o`, `.obj`, `.opt.abc`, and `.bc`).
- Fix: fix bugs in handling of `CLM_ARTIFACTS_PATH` (previously `CLEANABCPATH`
and `CLEANOPATH`).
- Fix: fix checking that bytecode needs to be regenerated when optimized ABC
code is used.
#### v1.3.4
- Fix: on Windows, don't let the compiler inherit all handles. This fixes the
bug that `clm` does not exit when the compiler crashes.
#### v1.3.3
- Fix: fix bytecode generation pipeline on Windows.
- Fix: implement `-ns` (generation of symbol table) on Windows.
#### v1.3.2
- Fix: increase some array and buffer sizes to fix segfaults on Windows.
#### v1.3.1
- Fix: implement `-aC` on Windows.
### v1.3.0
- Feature: add `-post-link` option, used for the iTasks web resource collector.
### v1.2.0
- Feature: add options `-Pw`, `-Pd`, `-Psa`, `-Pou`, `-Pfusion`,
`-Pgeneric_fusion` to 'lift' main module options (`-w`, `-nw`, etc.) to
project options. They are then applied to all modules in the project, instead
of only the main module.
#### v1.1.5
- Change: always recompile when `-c` ('check syntax') is given.
#### v1.1.4
- Change: use same tool names on Windows as on Linux (`cocl`, `cg`, `linker`,
`abcopt`, `bcgen`, `bclink`, `bcstrip`, `bcprelink`).
- Robustness: don't wait indefinitely for compiler output on Windows.
#### v1.1.3
- Fix: fix passing of compiler output on Windows.
#### v1.1.2
- Enhancement: generated bytecode is now stripped.
- Change: `.exe` is no longer included in the bytecode name.
#### v1.1.1
- Fix: don't generate bytecode when `-S` or `-O` is given.
### v1.1.0
- Feature: add bytecode generation support with `-optabc`, `-bytecode`, and
`-prelink-bytecode`.
#### v1.0.1
No notable changes.
## v1.0.0
First tagged version.