Skip to content

Commit

Permalink
Build HPy extra lib also for hybrid ABI
Browse files Browse the repository at this point in the history
  • Loading branch information
fangerer committed Dec 21, 2022
1 parent bd70205 commit eec0a97
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
2 changes: 1 addition & 1 deletion hpy/devel/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,7 @@ def _finalize_hpy_ext(self, ext):
if static_libs:
static_libs = self.hpydevel.get_static_libs(ext.hpy_abi)
if static_libs is None or len(static_libs) != 1:
raise DistutilsError('Expected exactly one static library for'
raise DistutilsError('Expected exactly one static library for '
'ABI "%s" but got: %r' %
(ext.hpy_abi, static_libs))

Expand Down
9 changes: 7 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,7 +120,8 @@ def get_scm_config():
'hpy/trace/src/include',
]

HPY_EXTRA_LIB_NAME = "hpy-extra-universal"
HPY_EXTRA_UNIVERSAL_LIB_NAME = "hpy-extra-universal"
HPY_EXTRA_HYBRID_LIB_NAME = "hpy-extra-hybrid"
HPY_CTX_LIB_NAME = "hpy-ctx-cpython"

HPY_BUILD_CLIB_ABI_ATTR = "hpy_abi"
Expand Down Expand Up @@ -183,9 +184,13 @@ def build_libraries(self, libraries):
self.build_clib = orig_build_clib


STATIC_LIBS = [(HPY_EXTRA_LIB_NAME,
STATIC_LIBS = [(HPY_EXTRA_UNIVERSAL_LIB_NAME,
{'sources': HPY_EXTRA_SOURCES,
HPY_BUILD_CLIB_ABI_ATTR: 'universal',
'macros': [('HPY_ABI_UNIVERSAL', None)]}),
(HPY_EXTRA_HYBRID_LIB_NAME,
{'sources': HPY_EXTRA_SOURCES,
HPY_BUILD_CLIB_ABI_ATTR: 'hybrid',
'macros': [('HPY_ABI_HYBRID', None)]}),
(HPY_CTX_LIB_NAME,
{'sources': HPY_EXTRA_SOURCES + HPY_CTX_SOURCES,
Expand Down

0 comments on commit eec0a97

Please sign in to comment.