Add CRYSTAL_CONFIG_CC compiler config#14318
Add CRYSTAL_CONFIG_CC compiler config#14318straight-shoota merged 1 commit intocrystal-lang:masterfrom
CRYSTAL_CONFIG_CC compiler config#14318Conversation
|
This pull request has been mentioned on Crystal Forum. There might be relevant details there: https://forum.crystal-lang.org/t/crystal-installation-using-linuxbrew-is-not-working/6559/15 |
|
I'm wondering about the discoverability of this value. IMO |
|
It should probably be in the output of |
|
For stdlib/compiler development, there's a catch: This approach doesn't work when using the makefile because it defines Line 51 in 2b0b506 |
This environment variable allows to bake into the compiler a default path for
CCpointing to a specific linker.Currently, the fixed default default is
cc(cl.exeon Windows). Changing this when compiling the compiler allows taking into account a linker designed for a specific build environment. An example for this would be homebrew, where the compiler should use the linker installed in homebrew because it knows where to find libraries installed via homebrew.An alternative would be patching the source when necessary, but that's more fragile. An environment variable is more reliable. It serves as a reference that this value can be configured.
Originally suggested in https://forum.crystal-lang.org/t/crystal-installation-using-linuxbrew-is-not-working/6559/10?u=straight-shoota