1
0

Funktions

This commit is contained in:
Tiger Wang
2020-05-27 23:48:49 +01:00
parent 6317176d7e
commit 2c0fc395ba
6 changed files with 292 additions and 279 deletions

View File

@@ -1,14 +1,16 @@
# TODO these should be in the submodules
# Under Windows, we need Lua as DLL; on *nix we need it linked statically:
if (WIN32)
target_compile_definitions(lua PUBLIC LUA_BUILD_AS_DLL)
endif()
function(emit_fixups)
# TODO these should be in the submodules
# Under Windows, we need Lua as DLL; on *nix we need it linked statically:
if (WIN32)
target_compile_definitions(lua PUBLIC LUA_BUILD_AS_DLL)
endif()
# Let Lua use additional checks on its C API. This is only compiled into Debug builds:
target_compile_definitions(lua PRIVATE LUA_USE_APICHECK)
# Let Lua use additional checks on its C API. This is only compiled into Debug builds:
target_compile_definitions(lua PRIVATE LUA_USE_APICHECK)
if(NOT MSVC AND "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
# mbed TLS uses the frame pointer's register in inline assembly for its bignum implementation:
# https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here
target_compile_options(mbedcrypto PRIVATE -fomit-frame-pointer)
endif()
if(NOT MSVC AND "${CMAKE_SYSTEM_PROCESSOR}" MATCHES "arm")
# mbed TLS uses the frame pointer's register in inline assembly for its bignum implementation:
# https://tls.mbed.org/kb/development/arm-thumb-error-r7-cannot-be-used-in-asm-here
target_compile_options(mbedcrypto PRIVATE -fomit-frame-pointer)
endif()
endfunction()