mirror of
https://github.com/reactos/reactos.git
synced 2024-09-29 14:09:10 +00:00
[CMAKE] Disable SSE instruction on GCC amd64 builds
Except for user-mode modules
This commit is contained in:
parent
ba74a05a17
commit
63944988a2
|
@ -172,6 +172,14 @@ add_definitions(-D_inline=__inline)
|
||||||
# Fix build with GLIBCXX + our c++ headers
|
# Fix build with GLIBCXX + our c++ headers
|
||||||
add_definitions(-D_GLIBCXX_HAVE_BROKEN_VSWPRINTF)
|
add_definitions(-D_GLIBCXX_HAVE_BROKEN_VSWPRINTF)
|
||||||
|
|
||||||
|
# Disable SSE globally on amd64 builds.
|
||||||
|
# We can't disable it for kernel mode modules only,
|
||||||
|
# as we don't call set_module_type on static libraries
|
||||||
|
# Instead we disable this options for user-mode modules
|
||||||
|
if(ARCH STREQUAL "amd64")
|
||||||
|
add_compile_options(-mno-sse)
|
||||||
|
endif()
|
||||||
|
|
||||||
# Alternative arch name
|
# Alternative arch name
|
||||||
if(ARCH STREQUAL "amd64")
|
if(ARCH STREQUAL "amd64")
|
||||||
set(ARCH2 x86_64)
|
set(ARCH2 x86_64)
|
||||||
|
@ -314,6 +322,9 @@ function(set_module_type_toolchain MODULE TYPE)
|
||||||
|
|
||||||
# Believe it or not, cmake doesn't do that
|
# Believe it or not, cmake doesn't do that
|
||||||
set_property(TARGET ${MODULE} APPEND PROPERTY LINK_DEPENDS $<TARGET_PROPERTY:native-pefixup,IMPORTED_LOCATION>)
|
set_property(TARGET ${MODULE} APPEND PROPERTY LINK_DEPENDS $<TARGET_PROPERTY:native-pefixup,IMPORTED_LOCATION>)
|
||||||
|
else()
|
||||||
|
# We can safely use SSE for user-mode parts
|
||||||
|
remove_target_compile_option(${MODULE} -mno-sse)
|
||||||
endif()
|
endif()
|
||||||
endfunction()
|
endfunction()
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue