Recognize misspelled env vars
Given the amount of ENZYME_ dbg vars, we should loop through all env vars and check if any unknown ones start with ENZYME_, and abort compilation because it probably implies a typo.
I agree with the sentiment, though it'll be common enough for people to define ENZYME_DIR or ENZYME_LIB for their build systems.
I am not sure how many people will actually develop both rust and enzyme and set those as env vars? Usually you pass them directly to cmake as -D something, right? But I als0 wouldn't mind much adding them to the list of whitelisted flags.
Here's an example doing that. The user sets ENZYME_LIB=/path/to/ClangEnzyme-17.so to activate Enzyme, which is otherwise optional. When I merge Rust support to this repository, it will still be able to coexist with the C/Enzyme code.
https://gitlab.com/micromorph/ratel/-/blob/main/Makefile?ref_type=heads#L57
https://gitlab.com/micromorph/ratel/-/blob/main/Makefile?ref_type=heads#L204
https://xkcd.com/1172/ ? But fair, I just didn't thought about pure makefiles.
There's an argument that it was a mistake that make variables set on the command line to be exported by default, but that bird has flown.
closing since both t-lang and t-compiler recommended to move this to flags, which IIRC already handle this.