Skip to content

Commit

Permalink
move Cinder/module to CinderX/
Browse files Browse the repository at this point in the history
Summary:
I want to add a compilation unit under `Cinder/` for general Cinder infra that is not specifically part of the JIT, Static Python, or Strict Modules. But currently all Cinder compilation units have to be symlinked into the `Cinder/module` directory, since we have the dual build setup where we can either build the Cinder module standalone, or build Cinder features into the main runtime the way we've always done. And I don't want to introduce a cyclic symlink from `Cinder/module/Cinder -> Cinder/`. So instead move `Cinder/module/` out to a separate top-level `CinderX/` to avoid this cycle.

The naming between "Cinder" and "CinderX" is a bit confusing here, but my intended logic is that "CinderX/" is specifically the extension module, whereas "Cinder/" is general Cinder code that can be built either as part of CinderX or into the runtime (though eventually only as part of CinderX, at which point the symlinks to `Cinder/`, `Jit/`, etc inside `CinderX` will become the sole real locations of those directories.)

Reviewed By: alexmalyshev

Differential Revision: D48019256

fbshipit-source-id: a65ab67c05c76d177b543fb8885a8b497b75d50f
  • Loading branch information
Carl Meyer authored and facebook-github-bot committed Aug 9, 2023
1 parent 86fcab9 commit 6ff5adb
Show file tree
Hide file tree
Showing 20 changed files with 8 additions and 8 deletions.
1 change: 0 additions & 1 deletion Cinder/module/Jit

This file was deleted.

1 change: 0 additions & 1 deletion Cinder/module/StaticPython

This file was deleted.

1 change: 0 additions & 1 deletion Cinder/module/StrictModules

This file was deleted.

1 change: 0 additions & 1 deletion Cinder/module/ThirdParty

This file was deleted.

1 change: 1 addition & 0 deletions CinderX/Jit
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions CinderX/StaticPython
1 change: 1 addition & 0 deletions CinderX/StrictModules
1 change: 1 addition & 0 deletions CinderX/ThirdParty
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 2 additions & 2 deletions Cinder/module/setup.py → CinderX/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
MODULE_DIR = os.path.dirname(os.path.realpath(__file__))

THIRD_PARTY_DIR = os.path.realpath(f"{MODULE_DIR}/ThirdParty")
CINDER_DIR = os.path.realpath(f"{MODULE_DIR}/..")
PYTHON_DIR = os.path.realpath(f"{MODULE_DIR}/../../")
PYTHON_DIR = os.path.realpath(f"{MODULE_DIR}/..")
CINDER_DIR = os.path.realpath(f"{PYTHON_DIR}/Cinder/")

INCLUDE_DIRS = [
f"{CINDER_DIR}/Include",
Expand Down
File renamed without changes.
4 changes: 2 additions & 2 deletions Makefile.pre.in
Original file line number Diff line number Diff line change
Expand Up @@ -328,7 +328,7 @@ ASAN_TEST_ENV_WITH_LSAN= @ASAN_TEST_ENV_WITH_LSAN@

ENABLE_CINDERX_SO=@ENABLE_CINDERX_SO@
ifeq ($(ENABLE_CINDERX_SO), yes)
CINDERX_SO=$(abs_srcdir)/Cinder/module/build/cinderx.$(SOABI).so
CINDERX_SO=$(abs_srcdir)/CinderX/build/cinderx.$(SOABI).so
else
CINDERX_SO=
endif
Expand Down Expand Up @@ -836,7 +836,7 @@ clinic: check-clean-src $(srcdir)/Modules/_blake2/blake2s_impl.c

.PHONY: $(CINDERX_SO)
$(CINDERX_SO):
$(abs_srcdir)/Cinder/module/build.sh
$(abs_srcdir)/CinderX/build.sh

# Build the interpreter
$(BUILDPYTHON): Programs/python.o $(LIBRARY_DEPS) $(CINDERX_SO)
Expand Down

0 comments on commit 6ff5adb

Please sign in to comment.