Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Makefile] Use EXPORT_CC for make crystal #11760

Merged

Conversation

straight-shoota
Copy link
Member

@straight-shoota straight-shoota commented Jan 22, 2022

All recipes use the EXPORT_CC override to configure using lld as linker, except for make crystal. Apparently, that's rarely an issue. But I recently started seeing linking errors like the ones in #7177 with default ld. Using lld fixes that, as we're already doing for all other build targets. This patch usees EXPORT_CC for make crystal as well (via EXPORTS_BUILD).

@straight-shoota
Copy link
Member Author

I considered refactoring this entirely as proposed in #8641 (comment) but I decided to make that a separate change. I'm not sure yet if there should be an option to override adding -fuse=ld.lld to CC (which is currently possible by defining EXPORT_CC).

@straight-shoota straight-shoota added this to the 1.6.0 milestone Sep 19, 2022
@straight-shoota straight-shoota merged commit c3d5e91 into crystal-lang:master Sep 20, 2022
@straight-shoota straight-shoota deleted the feature/make-cc branch September 20, 2022 19:08
@zw963
Copy link
Contributor

zw963 commented Oct 11, 2022

@straight-shoota , hi, can we add example here for how use ld.ldd as linker when run make in linux?

There is a issue #12542 probably related to this.

@straight-shoota
Copy link
Member Author

Hm, the makefile automatically uses ld.ldd if it's available.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants