| 28 Jun 2025 |
emily | https://clang.llvm.org/docs/UsersManual.html#configuration-files we can set an env variable to a directory that it will automatically load a file with command line args from based on language and target | 11:10:06 |
emily | that doesn't quite solve cases where we have more complex logic based on other parameters or environment variables, but it is a substantial chunk of the no-compiler-wrappers puzzle | 11:11:35 |
emily | and we could hopefully work with LLVM to find ways to eliminate as much custom logic as possible and find ways to move the rest into LLVM drivers | 11:12:34 |
emily | I am not sure if the files support environment variable references but if they do then we could presumably do things like -mmacosx-min-version=$MACOSX_DEPLOYMENT_TARGET_salt etc. | 11:14:44 |
emily | though doesn't quite help for static SDL stuff which may be the only remaining reason to care about salts for Darwin soon :P | 11:15:38 |
emily | *SDK | 11:15:43 |
emily | if someone wanted to prototype this I think it should be possible to make a derivation that extracts the relevant flag files from cc-wrapper and writes them into a directory with config files like this for all three platforms, and then you could try arranging an stdenv that exposed unwrapped LLVM directly with the relevant path variable set | 11:18:38 |
emily | since it searches for a file without the triple we can use it to implement a default target too although obviously we'd ideally prefer always passing a target - we can do always-prefixed compilers without wrappers because I believe that Clang interprets being invoked through a foo-clang symlink like clang -target foo | 11:21:13 |
emily | (but ideally you'd want the multi target Clang lying around as well - not sure if you can configure it to refuse to build without being given an explicit target but that sounds very much like something we could work with upstream on) | 11:22:16 |