Skip to content

Commit 905d38c

Browse files
committed
Further optimizations for the openssl C extension extconf.rb
1 parent 2272df7 commit 905d38c

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

src/main/c/openssl/extconf.rb

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,10 @@
2525

2626
Logging::message "=== OpenSSL for Ruby configurator ===\n"
2727

28-
# Add -Werror=deprecated-declarations to $warnflags if available
29-
OpenSSL.deprecated_warning_flag
28+
unless defined?(::TruffleRuby) # Let it be lazily computed only if needed
29+
# Add -Werror=deprecated-declarations to $warnflags if available
30+
OpenSSL.deprecated_warning_flag
31+
end
3032

3133
##
3234
# Adds -DOSSL_DEBUG for compilation and some more targets when GCC is used
@@ -37,8 +39,10 @@
3739
end
3840

3941
Logging::message "=== Checking for system dependent stuff... ===\n"
40-
have_library("nsl", "t_open")
41-
have_library("socket", "socket")
42+
unless defined?(::TruffleRuby) # These do not exist on any of our supported platforms
43+
have_library("nsl", "t_open")
44+
have_library("socket", "socket")
45+
end
4246
if $mswin || $mingw
4347
have_library("ws2_32")
4448
end

0 commit comments

Comments
 (0)