File tree Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Expand file tree Collapse file tree 2 files changed +5
-9
lines changed Original file line number Diff line number Diff line change 8
8
9
9
# Set OPENSSL_PREFIX in ENV to find the OpenSSL headers
10
10
11
- module Truffle
12
- OPENSSL_PREFIX_WAS_SET = ENV . key? ( 'OPENSSL_PREFIX' )
13
- end
14
-
15
11
search_homebrew = -> homebrew {
16
12
if prefix = "#{ homebrew } /opt/[email protected] " and Dir . exist? ( prefix )
17
13
prefix
@@ -20,10 +16,9 @@ module Truffle
20
16
end
21
17
}
22
18
23
- macOS = RUBY_PLATFORM . include? ( 'darwin' )
24
-
25
- if macOS && !ENV [ 'OPENSSL_PREFIX' ]
26
- if prefix = search_homebrew . call ( '/usr/local' )
19
+ if Truffle ::Platform . darwin? && !ENV [ 'OPENSSL_PREFIX' ]
20
+ default_homebrew_prefix = Truffle ::System . host_cpu == 'aarch64' ? '/opt/homebrew' : '/usr/local'
21
+ if prefix = search_homebrew . call ( default_homebrew_prefix )
27
22
# found
28
23
else
29
24
homebrew = `brew --prefix 2>/dev/null` . strip
Original file line number Diff line number Diff line change @@ -112,7 +112,8 @@ def find_openssl_library
112
112
113
113
# TruffleRuby: do not perform all checks again if extconf.h already exists
114
114
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__ )
116
117
$extconf_h = extconf_h
117
118
else
118
119
### START of checks
You can’t perform that action at this time.
0 commit comments