mirror of https://github.com/mgba-emu/mgba.git
PSP2: Update for Unity
This commit is contained in:
parent
abcc83f68c
commit
d263cca5fc
|
@ -10,6 +10,10 @@ else()
|
|||
set(DEVKITARM ${DEVKITPRO}/devkitARM)
|
||||
endif()
|
||||
|
||||
if(NOT DEFINED UNITY)
|
||||
set(UNITY ON)
|
||||
endif()
|
||||
|
||||
set(toolchain_dir ${DEVKITARM}/psp2)
|
||||
set(toolchain_bin_dir ${toolchain_dir}/bin)
|
||||
set(cross_prefix ${DEVKITARM}/bin/arm-none-eabi-)
|
||||
|
@ -24,7 +28,11 @@ set(CMAKE_AR ${cross_prefix}ar CACHE INTERNAL "archiver")
|
|||
set(CMAKE_C_COMPILER ${cross_prefix}gcc CACHE INTERNAL "c compiler")
|
||||
set(CMAKE_CXX_COMPILER ${cross_prefix}g++ CACHE INTERNAL "cxx compiler")
|
||||
set(CMAKE_ASM_COMPILER ${cross_prefix}gcc CACHE INTERNAL "assembler")
|
||||
set(common_flags "${arch_flags} -fno-reorder-functions -fno-optimize-sibling-calls ${inc_flags}")
|
||||
if(NOT UNITY)
|
||||
set(common_flags "${arch_flags} -fno-reorder-functions -fno-optimize-sibling-calls ${inc_flags}")
|
||||
else()
|
||||
set(common_flags "${arch_flags} -fno-gcse -fno-tree-vectorize ${inc_flags}")
|
||||
endif()
|
||||
set(CMAKE_C_FLAGS ${common_flags} CACHE INTERNAL "c compiler flags")
|
||||
set(CMAKE_ASM_FLAGS ${common_flags} CACHE INTERNAL "c compiler flags")
|
||||
set(CMAKE_CXX_FLAGS ${common_flags} CACHE INTERNAL "cxx compiler flags")
|
||||
|
|
|
@ -257,3 +257,8 @@ void GBAPSP2Draw(void) {
|
|||
vita2d_draw_texture_scale(tex, 120, 32, 3.0f, 3.0f);
|
||||
}
|
||||
}
|
||||
|
||||
__attribute__((noreturn, weak)) void __assert_func(const char* file, int line, const char* func, const char* expr) {
|
||||
printf("ASSERT FAILED: %s in %s at %s:%i\n", expr, func, file, line);
|
||||
exit(1);
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue