build: include "siphash24.c" source in "nm-hash-utils.c"

This allows the compiler to inline the siphash24*() functions
for nm_hash_ptr() and nm_hash_str() (even without LTO).

This of course only applies to nm_hash_ptr() and nm_hash_str(),
which are implemented in "nm-hash-utils.c" itself. All other
nm_hash_*() functions are inline functions in "nm-hash-utils.h",
and thus these functions can be inlined instead. That is, in
other cases, the nm_hash_*() function instead can be inlined.
For nm_hash_ptr() and nm_hash_str() instead we want to inline the
siphash24*() functions.

So, no longer compile "siphash24.c" directly. Instead, only
build "nm-hash-utils.c" which internally #include "siphash24.c".
This commit is contained in:
Thomas Haller
2017-11-16 10:47:54 +01:00
parent a6be2f4aa9
commit ac95f7da0b
2 changed files with 5 additions and 3 deletions

View File

@@ -28,6 +28,8 @@
#include "nm-shared-utils.h"
#include "nm-random-utils.h"
#include "siphash24.c"
/*****************************************************************************/
#define HASH_KEY_SIZE 16u