mirror of
https://github.com/pocketpy/pocketpy
synced 2026-03-24 14:10:18 +00:00
Compare commits
6 Commits
53fc4f36df
...
372325d663
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
372325d663 | ||
|
|
a3218e1e2e | ||
|
|
a2576a3fce | ||
|
|
be417ea528 | ||
|
|
ec704ed67b | ||
|
|
953926342f |
@ -5,6 +5,19 @@ project(pocketpy)
|
||||
set(CMAKE_C_STANDARD 11)
|
||||
set(CMAKE_C_STANDARD_REQUIRED ON)
|
||||
|
||||
# use IPO
|
||||
include(CheckIPOSupported)
|
||||
check_ipo_supported(RESULT result)
|
||||
|
||||
if(result AND NOT CMAKE_SYSTEM_NAME STREQUAL "iOS")
|
||||
set(CMAKE_INTERPROCEDURAL_OPTIMIZATION TRUE)
|
||||
else()
|
||||
message(WARNING ">> IPO disabled. You will get very poor performance!!")
|
||||
message(WARNING ">> IPO disabled. You will get very poor performance!!")
|
||||
message(WARNING ">> IPO disabled. You will get very poor performance!!")
|
||||
endif()
|
||||
|
||||
|
||||
if(MSVC)
|
||||
set(CMAKE_C_FLAGS "${CMAKE_C_FLAGS} /utf-8 /jumptablerdata /GS-")
|
||||
add_compile_options(/wd4267 /wd4244)
|
||||
@ -67,4 +80,4 @@ endif()
|
||||
# link math library
|
||||
if(UNIX)
|
||||
target_link_libraries(${PROJECT_NAME} m)
|
||||
endif()
|
||||
endif()
|
||||
|
||||
@ -8,7 +8,7 @@ from typing import List, Dict
|
||||
assert os.system("python prebuild.py") == 0
|
||||
|
||||
ROOT = 'include/pocketpy'
|
||||
PUBLIC_HEADERS = ['common/config.h', 'common/export.h', 'pocketpy.h']
|
||||
PUBLIC_HEADERS = ['config.h', 'export.h', 'pocketpy.h']
|
||||
|
||||
COPYRIGHT = '''/*
|
||||
* Copyright (c) 2024 blueloveTH
|
||||
|
||||
@ -1,5 +1,7 @@
|
||||
set -e
|
||||
|
||||
python amalgamate.py
|
||||
|
||||
rm -rf build
|
||||
mkdir build
|
||||
cd build
|
||||
@ -12,9 +14,11 @@ cmake --build os64 --config Release
|
||||
cmake -B simulatorarm64 -G Xcode $FLAGS -DPLATFORM=SIMULATORARM64 ..
|
||||
cmake --build simulatorarm64 --config Release
|
||||
|
||||
HEADERS="../amalgamated/pocketpy.h"
|
||||
|
||||
xcodebuild -create-xcframework \
|
||||
-library os64/Release-iphoneos/libpocketpy.a -headers ../include/pocketpy/pocketpy.h \
|
||||
-library simulatorarm64/Release-iphonesimulator/libpocketpy.a -headers ../include/pocketpy/pocketpy.h \
|
||||
-library os64/Release-iphoneos/libpocketpy.a -headers $HEADERS \
|
||||
-library simulatorarm64/Release-iphonesimulator/libpocketpy.a -headers $HEADERS \
|
||||
-output pocketpy.xcframework
|
||||
|
||||
|
||||
|
||||
@ -31,10 +31,6 @@
|
||||
#define PK_DEBUG_GC_STATS 0
|
||||
#define PK_DEBUG_COMPILER 0
|
||||
|
||||
#ifndef PK_DEBUG_PRECOMPILED_EXEC
|
||||
#define PK_DEBUG_PRECOMPILED_EXEC 0
|
||||
#endif
|
||||
|
||||
/*************** internal settings ***************/
|
||||
|
||||
// This is the maximum size of the value stack in py_TValue units
|
||||
@ -5,8 +5,8 @@
|
||||
#include <stdarg.h>
|
||||
#include <stddef.h>
|
||||
|
||||
#include "pocketpy/common/config.h"
|
||||
#include "pocketpy/common/export.h"
|
||||
#include "pocketpy/config.h"
|
||||
#include "pocketpy/export.h"
|
||||
|
||||
#ifdef __cplusplus
|
||||
extern "C" {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user