-
Notifications
You must be signed in to change notification settings - Fork 11
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
Static build support #41
Conversation
Evidently that's what Ruby expects it to be, regardless of target OS.
# Whether to use a statically linked extension. | ||
# | ||
def static_extension? | ||
ENV.key?('RUBY_STATIC') || RbConfig::CONFIG['ENABLE_SHARED'] == 'no' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
RUBY_STATIC
as per steveklabnik/ruby-sys#16 (comment)
# The basename of the Rust shared library, as installed in the {#ruby_extension_path}. | ||
# | ||
def shared_library | ||
@shared_library ||= "#{library_name}.so" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Apparently Ruby always expects the file extension to be .so
regardless of OS. I guess that makes it simpler.
end | ||
|
||
args |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Less variable mutation.
This passed the Travis CI push check, and the branch is based off of master, so I'm going to just merge. |
Fixes #22.