Refactor SDL/FreeRTOS implementation to support macOS simulator properly (#653)
- Run SDL from main() and place FreeRTOS in separate thread. This fixes macOS support. - Updated GitHub Actions to publish macOS simulator build for testing, updated amd64 to x86_64 for consistent naming.
This commit is contained in:
committed by
Adolfo Reyna
parent
89e8baf517
commit
72089f74f3
@@ -10,15 +10,29 @@ tactility_add_module(app-module
|
||||
INCLUDE_DIRS include/
|
||||
REQUIRES TactilityKernel service-module minitar
|
||||
PRIV_REQUIRES TactilityKernelCpp
|
||||
WHOLE_ARCHIVE
|
||||
)
|
||||
|
||||
# Tells source/io.cpp its real-syscall fallback must go through __real_read/write/close()
|
||||
# rather than calling ::read/::write/::close() directly, on every platform whose build wraps
|
||||
# those symbols (ESP-IDF always; POSIX except macOS, whose linker doesn't support --wrap) -
|
||||
# see Tactility/CMakeLists.txt and the top-level CMakeLists.txt for where that's applied.
|
||||
if (NOT APPLE)
|
||||
# Tells source/io.cpp its real-syscall fallback must go through __real_read/write/close() rather
|
||||
# than calling ::read/::write/::close() directly, on every platform where those are wrapped: via
|
||||
# -Wl,--wrap= on ESP-IDF (see the top-level CMakeLists.txt) and non-Apple POSIX (below), or via
|
||||
# source/stdio_wrap.cpp's dyld interpose on Apple (whose linker lacks --wrap).
|
||||
tactility_get_module_name(app-module MODULE_NAME)
|
||||
target_compile_definitions(${MODULE_NAME} PRIVATE TT_APP_IO_WRAPS_STDIO)
|
||||
|
||||
# Routes every read()/write()/close() and printf-family call to source/stdio_wrap.cpp's __wrap_*
|
||||
# functions; see that file for what they do and why. ESP-IDF wraps the same symbols itself (see
|
||||
# the top-level CMakeLists.txt); Apple gets the same routing via dyld interpose instead, self-
|
||||
# registered in that file. PUBLIC so every consumer of this module (Tactility, and any test target
|
||||
# that links app-module directly) gets the flags too.
|
||||
if (NOT ESP_PLATFORM AND NOT APPLE)
|
||||
tactility_get_module_name(app-module MODULE_NAME)
|
||||
target_compile_definitions(${MODULE_NAME} PRIVATE TT_APP_IO_WRAPS_STDIO)
|
||||
target_link_options(${MODULE_NAME} PUBLIC
|
||||
"-Wl,--wrap=read" "-Wl,--wrap=write" "-Wl,--wrap=close"
|
||||
"-Wl,--wrap=printf" "-Wl,--wrap=fprintf" "-Wl,--wrap=vprintf" "-Wl,--wrap=vfprintf"
|
||||
"-Wl,--wrap=puts" "-Wl,--wrap=fputs" "-Wl,--wrap=putchar" "-Wl,--wrap=fputc"
|
||||
"-Wl,--wrap=getchar" "-Wl,--wrap=fgetc" "-Wl,--wrap=fgets"
|
||||
)
|
||||
endif ()
|
||||
|
||||
# install.cpp resolves an installed binary's fixed bin/<platform>/<binary>.so path itself, so it
|
||||
|
||||
Reference in New Issue
Block a user