Skip to content

Commit 57880e6

Browse files
committed
Hardcode shared library extension to .so
Evidently that's what Ruby expects it to be, regardless of target OS.
1 parent c21024e commit 57880e6

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

lib/thermite/config.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,7 @@ def library_name
112112
#
113113
def cargo_shared_library
114114
@cargo_shared_library ||= begin
115-
filename = shared_library
115+
filename = "#{library_name}.#{shared_ext}"
116116
filename = "lib#{filename}" unless Gem.win_platform?
117117
filename
118118
end
@@ -122,7 +122,7 @@ def cargo_shared_library
122122
# The basename of the Rust shared library, as installed in the {#ruby_extension_path}.
123123
#
124124
def shared_library
125-
@shared_library ||= "#{library_name}.#{shared_ext}"
125+
@shared_library ||= "#{library_name}.so"
126126
end
127127

128128
#

test/lib/thermite/config_test.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@ def test_shared_library
7474
config.stubs(:library_name).returns('foobar')
7575
config.stubs(:shared_ext).returns('ext')
7676
Gem.stubs(:win_platform?).returns(false)
77-
assert_equal 'foobar.ext', config.shared_library
77+
assert_equal 'foobar.so', config.shared_library
7878
end
7979

8080
def test_shared_library_windows
8181
config.stubs(:library_name).returns('foobar')
8282
config.stubs(:shared_ext).returns('ext')
8383
Gem.stubs(:win_platform?).returns(true)
84-
assert_equal 'foobar.ext', config.shared_library
84+
assert_equal 'foobar.so', config.shared_library
8585
end
8686

8787
def test_cargo_shared_library

0 commit comments

Comments
 (0)