Skip to content

Commit c2250b9

Browse files
committed
Reuse the openssl extconf.h only in development (when built by mx)
1 parent cfdbabc commit c2250b9

File tree

2 files changed

+2
-5
lines changed

2 files changed

+2
-5
lines changed

lib/truffle/truffle/openssl-prefix.rb

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,6 @@
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-
1511
search_homebrew = -> homebrew {
1612
if prefix = "#{homebrew}/opt/[email protected]" and Dir.exist?(prefix)
1713
prefix

src/main/c/openssl/extconf.rb

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -112,7 +112,8 @@ def find_openssl_library
112112

113113
# TruffleRuby: do not perform all checks again if extconf.h already exists
114114
extconf_h = "#{__dir__}/extconf.h"
115-
if File.exist?(extconf_h) && File.mtime(extconf_h) >= File.mtime(__FILE__ ) && !Truffle::OPENSSL_PREFIX_WAS_SET
115+
in_development = ENV.key?('MX_HOME')
116+
if in_development && File.exist?(extconf_h) && File.mtime(extconf_h) >= File.mtime(__FILE__)
116117
$extconf_h = extconf_h
117118
else
118119
### START of checks

0 commit comments

Comments
 (0)