mirror of
https://github.com/pocketpy/pocketpy
synced 2025-11-06 19:50:16 +00:00
Compare commits
9 Commits
b7cda8969e
...
480a2646e4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
480a2646e4 | ||
|
|
ab4ff49eda | ||
|
|
eb280910c9 | ||
|
|
5cc224cb3e | ||
|
|
11868f12b2 | ||
|
|
6541b0faba | ||
|
|
4cea396016 | ||
|
|
1ea83cf10b | ||
|
|
8a98208a75 |
@ -6,10 +6,11 @@ set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
# use IPO
|
||||
option(PK_BUILD_WITH_IPO "" TRUE)
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT result)
|
||||
|
||||
if(result AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
if(result AND PK_BUILD_WITH_IPO)
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(WARNING ">> IPO disabled. You will not get the best performance.")
|
||||
|
||||
@ -6,7 +6,7 @@ rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
|
||||
FLAGS="-DCMAKE_TOOLCHAIN_FILE=3rd/ios.toolchain.cmake -DPK_BUILD_STATIC_LIB=ON -DDEPLOYMENT_TARGET=13.0"
|
||||
FLAGS="-DCMAKE_TOOLCHAIN_FILE=3rd/ios.toolchain.cmake -DPK_BUILD_STATIC_LIB=ON -DDEPLOYMENT_TARGET=13.0 -DPK_BUILD_WITH_IPO=OFF"
|
||||
|
||||
cmake -B os64 -G Xcode $FLAGS -DPLATFORM=OS64 ..
|
||||
cmake --build os64 --config Release
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
name: pocketpy
|
||||
description: A lightweight Python interpreter for game engines. It supports Android/iOS/Windows/Linux/MacOS.
|
||||
version: 2.0.1+7
|
||||
version: 2.0.1+8
|
||||
homepage: https://pocketpy.dev
|
||||
repository: https://github.com/pocketpy/pocketpy
|
||||
|
||||
|
||||
@ -1,12 +1,13 @@
|
||||
#include "pocketpy/pocketpy.h"
|
||||
#include "pocketpy/interpreter/vm.h"
|
||||
#include <time.h>
|
||||
#include <assert.h>
|
||||
|
||||
#define NANOS_PER_SEC 1000000000
|
||||
|
||||
#ifndef __circle__
|
||||
int64_t time_ns() {
|
||||
struct timespec tms;
|
||||
#if defined( __ANDROID__) || defined(__MINGW32__) || defined(__MINGW64__)
|
||||
#ifdef CLOCK_REALTIME
|
||||
clock_gettime(CLOCK_REALTIME, &tms);
|
||||
#else
|
||||
/* The C11 way */
|
||||
@ -18,6 +19,11 @@ int64_t time_ns() {
|
||||
nanos += tms.tv_nsec;
|
||||
return nanos;
|
||||
}
|
||||
#else
|
||||
int64_t time_ns() {
|
||||
return 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
static bool time_time(int argc, py_Ref argv) {
|
||||
PY_CHECK_ARGC(0);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user