Skip to content

Commit

Permalink
Add LDCXXSHARED to setup.py after setuptools release (#1013)
Browse files Browse the repository at this point in the history
**Context:**
New release of setuptools adds the system variable `LDCXXSHARED`

**Description of the Change:**

For MacOs we change LDCXXSHARED from bundle to dynamiclibrary.
  • Loading branch information
rmoyard authored Aug 13, 2024
1 parent f09c728 commit 66e226a
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -185,6 +185,8 @@ def run(self):
variables = sysconfig.get_config_vars()
# Here we need to switch the deault to MacOs dynamic lib
variables["LDSHARED"] = variables["LDSHARED"].replace("-bundle", "-dynamiclib")
if sysconfig.get_config_var("LDCXXSHARED"):
variables["LDCXXSHARED"] = variables["LDCXXSHARED"].replace("-bundle", "-dynamiclib")
custom_calls_extension = Extension(
"catalyst.utils.libcustom_calls",
sources=["frontend/catalyst/utils/libcustom_calls.cpp"],
Expand Down

0 comments on commit 66e226a

Please sign in to comment.