mirror of https://github.com/libsdl-org/SDL.git
Harmony port: Workflows (fix script error)
This commit is contained in:
parent
95ccfa69e5
commit
8f0b9c1151
|
|
@ -51,6 +51,9 @@ jobs:
|
|||
uses: ./.github/actions/setup-msvc-libusb
|
||||
with:
|
||||
arch: ${{ matrix.platform.setup-libusb-arch }}
|
||||
- name: 'Set up Harmony toolchain'
|
||||
if: ${{ matrix.platform.platform == 'harmony' }}
|
||||
uses: ./.github/actions/setup-harmony-toolchain
|
||||
- uses: mymindstorm/setup-emsdk@v14
|
||||
if: ${{ matrix.platform.platform == 'emscripten' }}
|
||||
with:
|
||||
|
|
|
|||
|
|
@ -1502,7 +1502,28 @@ if(ANDROID)
|
|||
endif()
|
||||
endif()
|
||||
endif()
|
||||
elseif(OHOS)
|
||||
# disable warnings from the toolchain
|
||||
sdl_compile_options(PRIVATE "-Wno-unused-command-line-argument")
|
||||
|
||||
set(CMAKE_C_COMPILER_EXTERNAL_TOOLCHAIN "")
|
||||
set(CMAKE_CXX_COMPILER_EXTERNAL_TOOLCHAIN "")
|
||||
|
||||
sdl_link_dependency(OHOS_LIBS LIBS ace_napi.z hilog_ndk.z ace_ndk.z rawfile.z pixelmap_ndk.z)
|
||||
|
||||
set(SDL_LOADSO_DLOPEN 1)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/loadso/dlopen/*.c")
|
||||
set(HAVE_SDL_LOADSO TRUE)
|
||||
|
||||
set(SDL_TIME_UNIX 1)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/time/unix/*.c")
|
||||
set(HAVE_SDL_TIME TRUE)
|
||||
|
||||
set(SDL_TIMER_UNIX 1)
|
||||
sdl_glob_sources("${SDL3_SOURCE_DIR}/src/timer/unix/*.c")
|
||||
set(HAVE_SDL_TIMERS TRUE)
|
||||
|
||||
CheckPTHREAD()
|
||||
elseif(EMSCRIPTEN)
|
||||
# Hide noisy warnings that intend to aid mostly during initial stages of porting a new
|
||||
# project. Uncomment at will for verbose cross-compiling -I/../ path info.
|
||||
|
|
|
|||
|
|
@ -373,7 +373,7 @@ function(SDL_PrintSummary)
|
|||
message(STATUS "")
|
||||
endif()
|
||||
|
||||
if(UNIX AND NOT (ANDROID OR APPLE OR EMSCRIPTEN OR HAIKU OR RISCOS))
|
||||
if(UNIX AND NOT (ANDROID OR APPLE OR EMSCRIPTEN OR HAIKU OR RISCOS OR OHOS))
|
||||
if(NOT (HAVE_X11 OR HAVE_WAYLAND))
|
||||
if(NOT SDL_UNIX_CONSOLE_BUILD)
|
||||
message(FATAL_ERROR
|
||||
|
|
|
|||
|
|
@ -112,6 +112,11 @@
|
|||
#undef SDL_PLATFORM_LINUX
|
||||
#endif
|
||||
|
||||
#if defined(OHOS) || defined(__OHOS__)
|
||||
#define SDL_PLATFORM_OHOS 1
|
||||
#undef SDL_PLATFORM_LINUX
|
||||
#endif
|
||||
|
||||
#if defined(__unix__) || defined(__unix) || defined(unix)
|
||||
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -536,9 +536,11 @@ static void SDL_TARGETING("ssse3") SDL_Convert_Swap32_SSSE3(Uint32* dst, const U
|
|||
// be guarded by the STDC FENV_ACCESS pragma; otherwise, it's undefined
|
||||
// behavior. However, the compiler support for this pragma is bad.
|
||||
#if defined(__clang__)
|
||||
#ifndef SDL_PLATFORM_OHOS
|
||||
#if __clang_major__ >= 12
|
||||
#pragma STDC FENV_ACCESS ON
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma fenv_access (on)
|
||||
#elif defined(__GNUC__)
|
||||
|
|
@ -813,9 +815,11 @@ static void SDL_Convert_Swap32_NEON(Uint32* dst, const Uint32* src, int num_samp
|
|||
}
|
||||
|
||||
#if defined(__clang__)
|
||||
#ifndef SDL_PLATFORM_OHOS
|
||||
#if __clang_major__ >= 12
|
||||
#pragma STDC FENV_ACCESS DEFAULT
|
||||
#endif
|
||||
#endif
|
||||
#elif defined(_MSC_VER)
|
||||
#pragma fenv_access (off)
|
||||
#elif defined(__GNUC__)
|
||||
|
|
|
|||
|
|
@ -169,7 +169,7 @@ void SDL_SYS_SetupThread(const char *name)
|
|||
pthread_sigmask(SIG_BLOCK, &mask, 0);
|
||||
#endif
|
||||
|
||||
#ifdef PTHREAD_CANCEL_ASYNCHRONOUS
|
||||
#if defined(PTHREAD_CANCEL_ASYNCHRONOUS) && !defined(SDL_PLATFORM_OHOS)
|
||||
// Allow ourselves to be asynchronously cancelled
|
||||
{
|
||||
int oldstate;
|
||||
|
|
|
|||
Loading…
Reference in New Issue