Skip to content

Commit ccc8656

Browse files
alexmalyshevfacebook-github-bot
authored andcommitted
Add ENABLE_{EVAL_HOOK,INTERPRETER_LOOP} to CMake build
Summary: Enabled by default for Meta Python 3.12, otherwise disabled. Reviewed By: yoney Differential Revision: D78677221 fbshipit-source-id: c5a97b578853ab5e1fcde42f722eb7ab4f83bdd1
1 parent debca49 commit ccc8656

3 files changed

Lines changed: 5 additions & 1 deletion

File tree

CMakeLists.txt

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,10 @@ macro(set_flag VAR)
4949
endmacro()
5050

5151
set_flag(ENABLE_ELF_READER)
52+
set_flag(ENABLE_EVAL_HOOK)
5253
set_flag(ENABLE_FUNC_EVENT_MODIFY_QUALNAME)
5354
set_flag(ENABLE_GENERATOR_AWAITER)
55+
set_flag(ENABLE_INTERPRETER_LOOP)
5456
set_flag(ENABLE_LAZY_IMPORTS)
5557
set_flag(ENABLE_PARALLEL_GC)
5658
set_flag(ENABLE_SYMBOLIZER)

_cinderx-lib.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
#include "internal/pycore_shadow_frame.h"
4747
#endif
4848

49-
#if PY_VERSION_HEX < 0x030D0000
49+
#if PY_VERSION_HEX < 0x030D0000 && defined(ENABLE_EVAL_HOOK)
5050
#include "cinder/hooks.h"
5151
#endif
5252

setup.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -108,8 +108,10 @@ def set_option(var: str, default: object) -> None:
108108
meta_312 = meta_python and py_version == "3.12"
109109

110110
set_option("ENABLE_ELF_READER", linux)
111+
set_option("ENABLE_EVAL_HOOK", meta_312)
111112
set_option("ENABLE_FUNC_EVENT_MODIFY_QUALNAME", meta_312)
112113
set_option("ENABLE_GENERATOR_AWAITER", meta_312)
114+
set_option("ENABLE_INTERPRETER_LOOP", meta_312)
113115
set_option("ENABLE_LAZY_IMPORTS", meta_312)
114116
set_option("ENABLE_PARALLEL_GC", meta_312)
115117
set_option("ENABLE_SYMBOLIZER", linux)

0 commit comments

Comments
 (0)