Skip to content

Commit 8cdc646

Browse files
committed
Do not use the extconf.h cache for OpenSSL when OPENSSL_PREFIX is set
* Ideally we would record the value of OPENSSL_PREFIX and compare, but extconf.h does not record that. * See #2660
1 parent fd6ffcd commit 8cdc646

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

lib/truffle/truffle/openssl-prefix.rb

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,10 @@
88

99
# Set OPENSSL_PREFIX in ENV to find the OpenSSL headers
1010

11+
module Truffle
12+
OPENSSL_PREFIX_WAS_SET = ENV.key?('OPENSSL_PREFIX')
13+
end
14+
1115
search_homebrew = -> homebrew {
1216
if prefix = "#{homebrew}/opt/[email protected]" and Dir.exist?(prefix)
1317
prefix

src/main/c/openssl/extconf.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def find_openssl_library
110110

111111
# TruffleRuby: do not perform all checks again if extconf.h already exists
112112
extconf_h = "#{__dir__}/extconf.h"
113-
if File.exist?(extconf_h) && File.mtime(extconf_h) >= File.mtime(__FILE__ )
113+
if File.exist?(extconf_h) && File.mtime(extconf_h) >= File.mtime(__FILE__ ) && !Truffle::OPENSSL_PREFIX_WAS_SET
114114
$extconf_h = extconf_h
115115
else
116116
### START of checks

0 commit comments

Comments
 (0)