Skip to content

Commit 8c5f91e

Browse files
committed
fixup! build: rework gyp files for zlib
1 parent 0f5c0d4 commit 8c5f91e

File tree

1 file changed

+42
-5
lines changed

1 file changed

+42
-5
lines changed

deps/zlib/zlib.gyp

Lines changed: 42 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,21 @@
3939
'include_dirs': [ '<(ZLIB_ROOT)' ],
4040
'defines': [ 'ZLIB_IMPLEMENTATION' ],
4141
'direct_dependent_settings': {
42+
'conditions': [
43+
['target_arch in "ia32 x64" and OS!="ios"', {
44+
'defines': [ 'ADLER32_SIMD_SSSE3' ],
45+
'conditions': [
46+
['OS=="win"', {
47+
'defines': [ 'X86_WINDOWS' ],
48+
},{
49+
'defines': [ 'X86_NOT_WINDOWS' ],
50+
}],
51+
],
52+
}],
53+
['arm_fpu=="neon"', {
54+
'defines': [ 'ADLER32_SIMD_NEON' ],
55+
}],
56+
],
4257
'include_dirs': [ '<(ZLIB_ROOT)' ],
4358
},
4459
'sources': [
@@ -70,6 +85,21 @@
7085
'defines': [ 'CRC32_ARMV8_CRC32' ],
7186
'include_dirs': [ '<(ZLIB_ROOT)' ],
7287
'direct_dependent_settings': {
88+
'defines': [ 'CRC32_ARMV8_CRC32' ],
89+
'conditions': [
90+
['OS=="android"', {
91+
'defines': [ 'ARMV8_OS_ANDROID' ],
92+
}],
93+
['OS=="linux"', {
94+
'defines': [ 'ARMV8_OS_LINUX' ],
95+
}],
96+
['OS=="mac"', {
97+
'defines': [ 'ARMV8_OS_MACOS' ],
98+
}],
99+
['OS=="win"', {
100+
'defines': [ 'ARMV8_OS_WINDOWS' ],
101+
}],
102+
],
73103
'include_dirs': [ '<(ZLIB_ROOT)' ],
74104
},
75105
'sources': [
@@ -102,6 +132,7 @@
102132
],
103133
'include_dirs': [ '<(ZLIB_ROOT)' ],
104134
'direct_dependent_settings': {
135+
'defines': [ 'CRC32_SIMD_SSE42_PCLMUL' ],
105136
'include_dirs': [ '<(ZLIB_ROOT)' ],
106137
},
107138
'sources': [
@@ -127,11 +158,19 @@
127158
'defines': [ 'INFLATE_CHUNK_READ_64LE' ],
128159
}],
129160
],
130-
}]
161+
}],
131162
],
132163
'include_dirs': [ '<(ZLIB_ROOT)' ],
133164
'defines': [ 'ZLIB_IMPLEMENTATION' ],
134165
'direct_dependent_settings': {
166+
'conditions': [
167+
['target_arch in "ia32 x64" and OS!="ios"', {
168+
'defines': [ 'INFLATE_CHUNK_SIMD_SSE2' ],
169+
}],
170+
['arm_fpu=="neon"', {
171+
'defines': [ 'INFLATE_CHUNK_SIMD_NEON' ],
172+
}],
173+
],
135174
'include_dirs': [ '<(ZLIB_ROOT)' ],
136175
},
137176
'sources': [
@@ -177,10 +216,8 @@
177216
],
178217
'defines': [ 'DEFLATE_SLIDE_HASH_SSE2' ],
179218
'conditions': [
180-
['OS=="win"', {
181-
'defines': [ 'X86_WINDOWS' ],
182-
},{
183-
'defines': [ 'X86_NOT_WINDOWS' ],
219+
['target_arch=="x64"', {
220+
'defines': [ 'INFLATE_CHUNK_READ_64LE' ],
184221
}],
185222
],
186223
}],

0 commit comments

Comments
 (0)