Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions cli/release-staging/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -238,9 +238,11 @@ function linuxCpuHasAvx2() {
// Windows version. Feature 40 = PF_AVX2_INSTRUCTIONS_AVAILABLE.
function probeWindowsAvx2() {
const script =
"$f = Add-Type -MemberDefinition '[DllImport(\"kernel32.dll\")] " +
"$f = Add-Type -MemberDefinition '" +
'[System.Runtime.InteropServices.DllImport("kernel32.dll")] ' +
"public static extern bool IsProcessorFeaturePresent(uint feature);' " +
"-Name Cpu -Namespace Win32 -PassThru; $f::IsProcessorFeaturePresent(40)"
"-Name Cpu -Namespace Win32 -PassThru -ErrorAction Stop; " +
"$f::IsProcessorFeaturePresent(40)"
try {
const out = execFileSync(
'powershell.exe',
Expand Down
6 changes: 4 additions & 2 deletions cli/release/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@ function linuxCpuHasAvx2() {
// Windows version. Feature 40 = PF_AVX2_INSTRUCTIONS_AVAILABLE.
function probeWindowsAvx2() {
const script =
"$f = Add-Type -MemberDefinition '[DllImport(\"kernel32.dll\")] " +
"$f = Add-Type -MemberDefinition '" +
'[System.Runtime.InteropServices.DllImport("kernel32.dll")] ' +
"public static extern bool IsProcessorFeaturePresent(uint feature);' " +
"-Name Cpu -Namespace Win32 -PassThru; $f::IsProcessorFeaturePresent(40)"
"-Name Cpu -Namespace Win32 -PassThru -ErrorAction Stop; " +
"$f::IsProcessorFeaturePresent(40)"
try {
const out = execFileSync(
'powershell.exe',
Expand Down
6 changes: 4 additions & 2 deletions freebuff/cli/release/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -237,9 +237,11 @@ function linuxCpuHasAvx2() {
// Windows version. Feature 40 = PF_AVX2_INSTRUCTIONS_AVAILABLE.
function probeWindowsAvx2() {
const script =
"$f = Add-Type -MemberDefinition '[DllImport(\"kernel32.dll\")] " +
"$f = Add-Type -MemberDefinition '" +
'[System.Runtime.InteropServices.DllImport("kernel32.dll")] ' +
"public static extern bool IsProcessorFeaturePresent(uint feature);' " +
"-Name Cpu -Namespace Win32 -PassThru; $f::IsProcessorFeaturePresent(40)"
"-Name Cpu -Namespace Win32 -PassThru -ErrorAction Stop; " +
"$f::IsProcessorFeaturePresent(40)"
try {
const out = execFileSync(
'powershell.exe',
Expand Down