Only Include "sse" Flags For i386/x86_64

This commit is contained in:
Thomas A. 2024-05-22 18:56:40 -07:00
parent 16eff803da
commit f5603bfd46

View File

@ -2,7 +2,11 @@ project(xpc)
cmake_minimum_required(VERSION 3.12)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3 -nostdinc -fblocks -fvisibility=hidden")
if(TARGET_i386 OR TARGET_x86_64)
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -msse -msse2 -msse3")
endif()
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -nostdinc -fblocks -fvisibility=hidden")
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -D__DARWIN_UNIX03 -fPIC -U_POSIX_C_SOURCE")
set(CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -nostdlib")