Skip to content

Commit

Permalink
fixup! build: rework gyp files for zlib
Browse files Browse the repository at this point in the history
  • Loading branch information
lpinca committed Nov 23, 2022
1 parent 0f5c0d4 commit 8c5f91e
Showing 1 changed file with 42 additions and 5 deletions.
47 changes: 42 additions & 5 deletions deps/zlib/zlib.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,21 @@
'include_dirs': [ '<(ZLIB_ROOT)' ],
'defines': [ 'ZLIB_IMPLEMENTATION' ],
'direct_dependent_settings': {
'conditions': [
['target_arch in "ia32 x64" and OS!="ios"', {
'defines': [ 'ADLER32_SIMD_SSSE3' ],
'conditions': [
['OS=="win"', {
'defines': [ 'X86_WINDOWS' ],
},{
'defines': [ 'X86_NOT_WINDOWS' ],
}],
],
}],
['arm_fpu=="neon"', {
'defines': [ 'ADLER32_SIMD_NEON' ],
}],
],
'include_dirs': [ '<(ZLIB_ROOT)' ],
},
'sources': [
Expand Down Expand Up @@ -70,6 +85,21 @@
'defines': [ 'CRC32_ARMV8_CRC32' ],
'include_dirs': [ '<(ZLIB_ROOT)' ],
'direct_dependent_settings': {
'defines': [ 'CRC32_ARMV8_CRC32' ],
'conditions': [
['OS=="android"', {
'defines': [ 'ARMV8_OS_ANDROID' ],
}],
['OS=="linux"', {
'defines': [ 'ARMV8_OS_LINUX' ],
}],
['OS=="mac"', {
'defines': [ 'ARMV8_OS_MACOS' ],
}],
['OS=="win"', {
'defines': [ 'ARMV8_OS_WINDOWS' ],
}],
],
'include_dirs': [ '<(ZLIB_ROOT)' ],
},
'sources': [
Expand Down Expand Up @@ -102,6 +132,7 @@
],
'include_dirs': [ '<(ZLIB_ROOT)' ],
'direct_dependent_settings': {
'defines': [ 'CRC32_SIMD_SSE42_PCLMUL' ],
'include_dirs': [ '<(ZLIB_ROOT)' ],
},
'sources': [
Expand All @@ -127,11 +158,19 @@
'defines': [ 'INFLATE_CHUNK_READ_64LE' ],
}],
],
}]
}],
],
'include_dirs': [ '<(ZLIB_ROOT)' ],
'defines': [ 'ZLIB_IMPLEMENTATION' ],
'direct_dependent_settings': {
'conditions': [
['target_arch in "ia32 x64" and OS!="ios"', {
'defines': [ 'INFLATE_CHUNK_SIMD_SSE2' ],
}],
['arm_fpu=="neon"', {
'defines': [ 'INFLATE_CHUNK_SIMD_NEON' ],
}],
],
'include_dirs': [ '<(ZLIB_ROOT)' ],
},
'sources': [
Expand Down Expand Up @@ -177,10 +216,8 @@
],
'defines': [ 'DEFLATE_SLIDE_HASH_SSE2' ],
'conditions': [
['OS=="win"', {
'defines': [ 'X86_WINDOWS' ],
},{
'defines': [ 'X86_NOT_WINDOWS' ],
['target_arch=="x64"', {
'defines': [ 'INFLATE_CHUNK_READ_64LE' ],
}],
],
}],
Expand Down

0 comments on commit 8c5f91e

Please sign in to comment.