Skip to content

Commit

Permalink
Compile optimized SSE version on x86 only
Browse files Browse the repository at this point in the history
  • Loading branch information
ranisalt committed Jun 6, 2016
1 parent 3e56cf5 commit 0865b21
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"target_defaults": {
"target_conditions": [
["OS != 'win'", {
"cflags": ["-fvisibility=hidden", "-msse", "-msse2"]
"cflags": ["-fvisibility=hidden"]
}]
]
},
Expand All @@ -15,10 +15,17 @@
"argon2/src/blake2/blake2b.c",
"argon2/src/thread.c",
"argon2/src/encoding.c",
"argon2/src/opt.c"
],
"include_dirs": ["argon2/include"],
"cflags": ["-march=native", "-pthread", "-Wno-type-limits"],
"conditions": [
["target_arch == 'ia32' or target_arch == 'x64'", {
"cflags+": ["-msse", "-msse2"],
"sources+": ["argon2/src/opt.c"]
}, {
"sources+": ["argon2/src/ref.c"]
}]
],
"type": "static_library"
}, {
"target_name": "argon2",
Expand Down

0 comments on commit 0865b21

Please sign in to comment.