diff --git a/binding.gyp b/binding.gyp index 78898c6b..a186cf17 100644 --- a/binding.gyp +++ b/binding.gyp @@ -2,7 +2,7 @@ "target_defaults": { "target_conditions": [ ["OS != 'win'", { - "cflags": ["-fvisibility=hidden", "-msse", "-msse2"] + "cflags": ["-fvisibility=hidden"] }] ] }, @@ -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",