Fixed #7158: detection of arm neon.
(cherry picked from commit 6e075a6a7d
)
This commit is contained in:
parent
dfd5abc42b
commit
50bc2d59e8
@ -598,6 +598,12 @@ if(ANDROID)
|
|||||||
set (WITH_NEON OFF)
|
set (WITH_NEON OFF)
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
if(ANDROID_ABI STREQUAL arm64-v8a)
|
||||||
|
# https://github.com/android/ndk/issues/910
|
||||||
|
add_definitions(-D__ARM_NEON)
|
||||||
|
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} -mfloat-abi=softfp")
|
||||||
|
endif()
|
||||||
|
|
||||||
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
if("${CMAKE_BUILD_TYPE}" STREQUAL "Debug")
|
||||||
add_definitions(-DNDK_DEBUG=1)
|
add_definitions(-DNDK_DEBUG=1)
|
||||||
|
|
||||||
|
@ -211,7 +211,12 @@ if(FAAC_FOUND)
|
|||||||
endif()
|
endif()
|
||||||
|
|
||||||
if(WITH_NEON)
|
if(WITH_NEON)
|
||||||
set_source_files_properties(${CODEC_NEON_SRCS} PROPERTIES COMPILE_FLAGS "-mfpu=neon -Wno-unused-variable" )
|
check_symbol_exists("_M_AMD64" "" MSVC_ARM64)
|
||||||
|
check_symbol_exists("__aarch64__" "" ARCH_ARM64)
|
||||||
|
|
||||||
|
if (NOT MSVC_ARM64 AND NOT ARCH_ARM64)
|
||||||
|
set_source_files_properties(${CODEC_NEON_SRCS} PROPERTIES COMPILE_FLAGS "-mfpu=neon" )
|
||||||
|
endif()
|
||||||
set(CODEC_SRCS ${CODEC_SRCS} ${CODEC_NEON_SRCS})
|
set(CODEC_SRCS ${CODEC_SRCS} ${CODEC_NEON_SRCS})
|
||||||
endif()
|
endif()
|
||||||
|
|
||||||
|
@ -21,7 +21,7 @@
|
|||||||
#include "config.h"
|
#include "config.h"
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(__ARM_NEON__)
|
#if defined(__ARM_NEON)
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <stdio.h>
|
||||||
#include <stdlib.h>
|
#include <stdlib.h>
|
||||||
@ -241,4 +241,4 @@ void rfx_init_neon(RFX_CONTEXT* context)
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#endif // __ARM_NEON__
|
#endif // __ARM_NEON
|
||||||
|
Loading…
Reference in New Issue
Block a user