Skip to content

Commit

Permalink
build: Move -lgmp flag to LDFLAGS
Browse files Browse the repository at this point in the history
* Linker flags are for LDFLAGS and not for CXX flags.
  • Loading branch information
matthewfeickert committed Sep 13, 2024
1 parent 2f1294d commit 39e8267
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,8 @@ def build_extensions(self):
env = os.environ.copy()
env["PYTHON"] = sys.executable
env["PYTHON_INCLUDE"] = f'-I{sysconfig.get_path("include")}'
env["CXXFLAGS"] = "-O3 -Bstatic -lgmp -Bdynamic -std=c++17"
env["LDFLAGS"] = env.get("LDFLAGS", "") + f" -Wl,-rpath,{_rpath}"
env["CXXFLAGS"] = "-O3 -Bstatic -Bdynamic -std=c++17"
env["LDFLAGS"] = env.get("LDFLAGS", "") + f" -lgmp -Wl,-rpath,{_rpath}"
env["ORIGIN"] = "$ORIGIN" # if evaluated, it will still be '$ORIGIN'

args = [
Expand Down

0 comments on commit 39e8267

Please sign in to comment.