[MSVCRTEX] Add some routines required for clang optimizations

- Include exp2* in all clang builds
- Include __aulldiv for i386 ones

Those are required, at least for clang-cl Release configuration
This commit is contained in:
Victor Perevertkin 2021-08-02 00:19:31 +03:00
parent 14fbe80c4a
commit 03506b90e0
No known key found for this signature in database
GPG key ID: C750B7222E9C7830

View file

@ -43,19 +43,24 @@ else()
list(APPEND MSVCRTEX_SOURCE
startup/pseudo-reloc.c
startup/pseudo-reloc-list.c)
if (CLANG)
# CLang performs some optimisations requiring those funtions
list(APPEND MSVCRTEX_SOURCE
math/exp2.c
math/exp2f.c)
endif()
endif()
if(CMAKE_C_COMPILER_ID STREQUAL "Clang")
# Clang performs some optimizations requiring those funtions
list(APPEND MSVCRTEX_SOURCE
math/exp2.c
math/exp2f.c
)
endif()
if(ARCH STREQUAL "i386")
# Clang wants __aulldiv for its optimizations
list(APPEND MSVCRTEX_ASM_SOURCE
except/i386/chkstk_asm.s
except/i386/chkstk_ms.s
math/i386/alldiv_asm.s)
math/i386/alldiv_asm.s
math/i386/aulldiv_asm.s
)
if (GCC AND CLANG)
list(APPEND MSVCRTEX_ASM_SOURCE
math/i386/ceilf.S