Skip to content

Commit

Permalink
Merge pull request #6 from kadena-io/johnw/flags
Browse files Browse the repository at this point in the history
Only include certain compiler flags if we're on x86-64
  • Loading branch information
jwiegley authored Feb 9, 2023
2 parents 5fcfe0e + 826434e commit d8f962b
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 2 deletions.
2 changes: 2 additions & 0 deletions vendored/rocksdb-haskell/rocksdb-6.29.3/util/crc32c.cc
Original file line number Diff line number Diff line change
Expand Up @@ -355,6 +355,7 @@ static inline void Slow_CRC32(uint64_t* l, uint8_t const **p) {
table0_[c >> 24];
}

#if defined(__linux__)
#if (!(defined(HAVE_POWER8) && defined(HAS_ALTIVEC))) && \
(!defined(HAVE_ARM64_CRC)) || \
defined(NO_THREEWAY_CRC32C)
Expand All @@ -372,6 +373,7 @@ static inline void Fast_CRC32(uint64_t* l, uint8_t const **p) {
#endif
}
#endif
#endif

template<void (*CRC32)(uint64_t*, uint8_t const**)>
uint32_t ExtendImpl(uint32_t crc, const char* buf, size_t size) {
Expand Down
7 changes: 5 additions & 2 deletions vendored/rocksdb-haskell/rocksdb-haskell-kadena.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -131,9 +131,7 @@ library
-DLZ4
-DZSTD
-DROCKSDB_BACKTRACE
-march=x86-64
-mtune=generic
-msse3
-DROCKSDB_SUPPORT_THREAD_LOCAL
-fno-omit-frame-pointer
-momit-leaf-frame-pointer
Expand All @@ -143,6 +141,11 @@ library
-Wno-missing-field-initializers
-O2

if arch(x86_64)
cxx-options:
-march=x86-64
-msse3

if flag(with-tbb)
cxx-options:
-DTBB
Expand Down

0 comments on commit d8f962b

Please sign in to comment.