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

Allow overriding gcc with the CC env var in const_generator.rb and struct_generator.rb #897

Merged
merged 1 commit into from Apr 15, 2021

Conversation

leshik
Copy link
Contributor

@leshik leshik commented Apr 15, 2021

Right now one can override gcc for types_generator.rb, but not const_generator.rb and struct_generator.rb. This PR fixes this.

Related: typhoeus/ethon#186

@larskanis larskanis merged commit 4430b6d into ffi:master Apr 15, 2021
@leshik leshik deleted the fix-cc branch April 15, 2021 12:00
@larskanis
Copy link
Member

There could be more compiler independence in this part of the code, probably.

It also makes the compiler a runtime dependency of the gem, which most ffi based gems don't have otherwise. That's why these classes are rarely used. On the other hand ffi.gem needs a compiler anyway in most cases.

@leshik
Copy link
Contributor Author

leshik commented Apr 16, 2021

On the other hand ffi.gem needs a compiler anyway in most cases.

@larskanis Right, but it's usually a good idea to separate build & runtime. E.g. in my case, gcc is used on bundle install stage to build things like nokogiri and ffi, but it's missing at runtime. Now I added tcc to runtime as it adds only 100kb overhead to the Docker image.

@Baltazardoung
Copy link

Can you tell us when a new version (v1.15.1 ?) including this patch will be released ? Thanks a lot.

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

Successfully merging this pull request may close these issues.

None yet

3 participants