cc-wrapper: Salt environment variables with LLVM triples
We now (on cross) require per-target flag interposition by putting the triple in the names of the relevant environment variables, e.g: export NIX_arm_unknown_linux_gnu_CFLAGS_COMPILE=... The wrapper also has a `infixSalt` attribute (and "_" prefixed and suffixed variants) to assist downstream packages. Note how that the dashes are replaced to keep the identifier valid. Using names like this allows us to keep the settings for different compilers seperate. I think it might be even better to use names like `NIX_{BUILD,HOST}...` using the platform's role rather than the platform itself, but this would be more work as the previous stages' tools would have to be re- wrapped to take on their new role. I therefore didn't do this for now, but that route should be thoroughly explored in the future.
parent
04a3cad9
Please register or sign in to comment