Skip to content

Commit

Permalink
bug: only use -march=native on x86
Browse files Browse the repository at this point in the history
Closes #6
  • Loading branch information
zbjornson committed Sep 17, 2023
1 parent 73d231e commit 252b895
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
"<!(node -e \"require('nan')\")"
],
"cflags":[
"-march=native",
"-falign-loops=32", # See readme; significant improvement for some cases
"-Wno-unused-function", # CPU feature detection only used on Win
"-Wno-unused-const-variable", # cpuid regs
Expand All @@ -21,11 +20,22 @@
},
"xcode_settings": {
"OTHER_CPLUSPLUSFLAGS": [
"-march=native",
"-Wno-unused-function", # CPU feature detection only used on Win
"-Wno-unused-const-variable"
]
}
},
"conditions": [
['target_arch != "arm64"', {
"cflags": [
"-march=native"
],
"xcode_settings" : {
"OTHER_CPLUSPLUSFLAGS": [
"-march=native"
]
}
}]
]
}
]
}

0 comments on commit 252b895

Please sign in to comment.