ya.make 1.4 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. LIBRARY()
  2. LICENSE(Apache-2.0)
  3. VERSION(1.0)
  4. LICENSE_TEXTS(.yandex_meta/licenses.list.txt)
  5. NO_UTIL()
  6. NO_COMPILER_WARNINGS()
  7. NO_JOIN_SRC()
  8. IF (GCC AND USE_LTO)
  9. CFLAGS(-DCRCUTIL_FORCE_ASM_CRC32C=1)
  10. ENDIF()
  11. IF (ARCH_I386 OR ARCH_X86_64)
  12. IF (OS_WINDOWS)
  13. SRCS(
  14. multiword_64_64_cl_i386_mmx.cc
  15. )
  16. ELSEIF (OS_ANDROID AND ARCH_I386)
  17. # 32-bit Android has some problems with register allocation, so we fall back to default implementation
  18. ELSE()
  19. IF (CLANG)
  20. CFLAGS(-DCRCUTIL_USE_MM_CRC32=1)
  21. IF (ARCH_I386)
  22. # clang doesn't support this as optimization attribute and has problems with register allocation
  23. SRC(
  24. multiword_64_64_gcc_i386_mmx.cc
  25. -fomit-frame-pointer
  26. )
  27. ELSE()
  28. SRCS(
  29. multiword_64_64_gcc_i386_mmx.cc
  30. )
  31. ENDIF()
  32. ELSE()
  33. CFLAGS(
  34. -mcrc32
  35. -DCRCUTIL_USE_MM_CRC32=1
  36. )
  37. ENDIF()
  38. SRCS(
  39. multiword_128_64_gcc_amd64_sse2.cc
  40. multiword_64_64_gcc_amd64_asm.cc
  41. )
  42. ENDIF()
  43. IF (OS_WINDOWS)
  44. SRCS(
  45. crc32c_sse4.cc
  46. )
  47. ELSE()
  48. SRC_C_SSE4(crc32c_sse4.cc)
  49. ENDIF()
  50. ENDIF()
  51. SRCS(
  52. interface.cc
  53. multiword_64_64_intrinsic_i386_mmx.cc
  54. )
  55. END()