Skip to content

Commit

Permalink
trie: Limit target_clones to glibc
Browse files Browse the repository at this point in the history
Musl doesn't support ifuncs.
  • Loading branch information
tavianator committed Nov 16, 2022
1 parent 906b0e9 commit 3604eed
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/trie.c
Original file line number Diff line number Diff line change
Expand Up @@ -103,16 +103,16 @@
#include <stdlib.h>
#include <string.h>

#if __has_attribute(target_clones) && (__i386__ || __x86_64__)
#if CHAR_BIT != 8
# error "This trie implementation assumes 8-bit bytes."
#endif

#if __GLIBC__ && __has_attribute(target_clones) && (__i386__ || __x86_64__)
# define TARGET_CLONES_POPCNT __attribute__((target_clones("popcnt", "default")))
#else
# define TARGET_CLONES_POPCNT
#endif

#if CHAR_BIT != 8
# error "This trie implementation assumes 8-bit bytes."
#endif

/** Number of bits for the sparse array bitmap, aka the range of a nibble. */
#define BITMAP_BITS 16
/** The number of remaining bits in a word, to hold the offset. */
Expand Down

0 comments on commit 3604eed

Please sign in to comment.