Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 0a87136

Browse files
committed
Fix i686 builds
We should test compilation with `-msse2` because we need to test with whatever arguments Ruby will be compiled with.
1 parent 0ae5465 commit 0a87136

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

ext/json/ext/generator/extconf.rb

+1-1
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
end
2323
end
2424

25-
if have_header('x86intrin.h') && have_type('__m128i', headers=['x86intrin.h']) && try_compile(<<~'SRC', opt='-msse2')
25+
if have_header('x86intrin.h') && have_type('__m128i', headers=['x86intrin.h']) && try_compile(<<~'SRC')
2626
#include <x86intrin.h>
2727
int main() {
2828
__m128i test = _mm_set1_epi8(32);

ext/json/ext/generator/generator.c

+2-2
Original file line numberDiff line numberDiff line change
@@ -117,9 +117,9 @@ typedef struct _search_state {
117117
const char *chunk_end;
118118
bool has_matches;
119119

120-
#ifdef HAVE_SIMD_NEON
120+
#if defined(HAVE_SIMD_NEON)
121121
uint64_t matches_mask;
122-
#elif HAVE_SIMD_SSE2
122+
#elif defined(HAVE_SIMD_SSE2)
123123
int matches_mask;
124124
#else
125125
#error "Unknown SIMD Implementation."

0 commit comments

Comments
 (0)