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() {
2121 * Checks from /proc/cpuinfo if the CPU supports SSE 4.2 instructions.
2222 */
2323function sse42FromCPUInfo ( ) {
24- const sse42Override = overrideSSE42IsSupported ( ) ;
25- if ( sse42Override !== null ) {
26- return sse42Override ;
27- }
2824 try {
2925 const cpuinfo = readFileSync ( '/proc/cpuinfo' , 'utf8' ) ;
3026 const flagsMatch = cpuinfo . match ( / f l a g s \s * : \s * ( .+ ) / m) ;
@@ -53,6 +49,10 @@ function isLinuxX64() {
5349 * This function checks if we are on linux x64 and if yes, checks `/proc/cpuinfo` for the SSE 4.2 flag.
5450 */
5551export function isSharpSupported ( ) {
52+ const sse42Override = overrideSSE42IsSupported ( ) ;
53+ if ( sse42Override !== null ) {
54+ return sse42Override ;
55+ }
5656 if ( isLinuxX64 ( ) ) {
5757 return sse42FromCPUInfo ( ) ;
5858 }
You can’t perform that action at this time.
0 commit comments