From be417ea52823d328bea8deebf8958b3b224958b9 Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Thu, 22 Aug 2024 17:33:08 +0800 Subject: [PATCH] ... --- CMakeLists.txt | 4 ++-- amalgamate.py | 2 +- include/pocketpy/{common => }/config.h | 4 ---- include/pocketpy/{common => }/export.h | 0 include/pocketpy/pocketpy.h | 4 ++-- 5 files changed, 5 insertions(+), 9 deletions(-) rename include/pocketpy/{common => }/config.h (95%) rename include/pocketpy/{common => }/export.h (100%) diff --git a/CMakeLists.txt b/CMakeLists.txt index 71126a69..7f74012c 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -9,7 +9,7 @@ set(CMAKE_C_STANDARD_REQUIRED ON) include(CheckIPOSupported) check_ipo_supported(RESULT result) -if(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!!") @@ -80,4 +80,4 @@ endif() # link math library if(UNIX) target_link_libraries(${PROJECT_NAME} m) -endif() \ No newline at end of file +endif() diff --git a/amalgamate.py b/amalgamate.py index 9d96173d..2ccfd7b2 100644 --- a/amalgamate.py +++ b/amalgamate.py @@ -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 diff --git a/include/pocketpy/common/config.h b/include/pocketpy/config.h similarity index 95% rename from include/pocketpy/common/config.h rename to include/pocketpy/config.h index f67c3995..1aab93df 100644 --- a/include/pocketpy/common/config.h +++ b/include/pocketpy/config.h @@ -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 diff --git a/include/pocketpy/common/export.h b/include/pocketpy/export.h similarity index 100% rename from include/pocketpy/common/export.h rename to include/pocketpy/export.h diff --git a/include/pocketpy/pocketpy.h b/include/pocketpy/pocketpy.h index c76fecab..6990330f 100644 --- a/include/pocketpy/pocketpy.h +++ b/include/pocketpy/pocketpy.h @@ -5,8 +5,8 @@ #include #include -#include "pocketpy/common/config.h" -#include "pocketpy/common/export.h" +#include "pocketpy/config.h" +#include "pocketpy/export.h" #ifdef __cplusplus extern "C" {