File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -169,17 +169,18 @@ else()
169
169
execute_process (COMMAND ${CMAKE_C_COMPILER} -dumpmachine
170
170
OUTPUT_VARIABLE UC_COMPILER_VERSION )
171
171
172
- string (FIND "${UC_COMPILER_VERSION} " "i686" UC_RET )
173
- if (${UC_RET} GREATER_EQUAL "0" )
172
+ if (UC_COMPILER_VERSION MATCHES "^i686.*" )
174
173
set (UNICORN_TARGET_ARCH "i386" )
175
174
set (UNICORN_CFLAGS -m32 -static-libgcc ) # Workaround for github action bugs
176
175
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m32" )
177
176
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m32" )
178
- else ( )
177
+ elseif ( UC_COMPILER_VERSION MATCHES "^x86_64.*" )
179
178
set (UNICORN_TARGET_ARCH "i386" )
180
179
set (UNICORN_CFLAGS -m64 -mcx16 )
181
180
set (CMAKE_EXE_LINKER_FLAGS "${CMAKE_EXE_LINKER_FLAGS} -m64" )
182
181
set (CMAKE_SHARED_LINKER_FLAGS "${CMAKE_SHARED_LINKER_FLAGS} -m64" )
182
+ elseif (UC_COMPILER_VERSION MATCHES "^aarch64.*" )
183
+ set (UNICORN_TARGET_ARCH "aarch64" )
183
184
endif ()
184
185
elseif (ANDROID_ABI )
185
186
string (FIND "${ANDROID_ABI} " "arm64" UC_RET )
You can’t perform that action at this time.
0 commit comments