File tree Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Expand file tree Collapse file tree 1 file changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -21,10 +21,6 @@ function overrideSSE42IsSupported() {
21
21
* Checks from /proc/cpuinfo if the CPU supports SSE 4.2 instructions.
22
22
*/
23
23
function sse42FromCPUInfo ( ) {
24
- const sse42Override = overrideSSE42IsSupported ( ) ;
25
- if ( sse42Override !== null ) {
26
- return sse42Override ;
27
- }
28
24
try {
29
25
const cpuinfo = readFileSync ( '/proc/cpuinfo' , 'utf8' ) ;
30
26
const flagsMatch = cpuinfo . match ( / f l a g s \s * : \s * ( .+ ) / m) ;
@@ -53,6 +49,10 @@ function isLinuxX64() {
53
49
* This function checks if we are on linux x64 and if yes, checks `/proc/cpuinfo` for the SSE 4.2 flag.
54
50
*/
55
51
export function isSharpSupported ( ) {
52
+ const sse42Override = overrideSSE42IsSupported ( ) ;
53
+ if ( sse42Override !== null ) {
54
+ return sse42Override ;
55
+ }
56
56
if ( isLinuxX64 ( ) ) {
57
57
return sse42FromCPUInfo ( ) ;
58
58
}
You can’t perform that action at this time.
0 commit comments