diff --git a/setup.py b/setup.py index b7a24c47..85e53ff4 100644 --- a/setup.py +++ b/setup.py @@ -97,7 +97,7 @@ 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 -Bdynamic -std=c++17" + env["CXXFLAGS"] = "-O3 -Bstatic -Bdynamic -std=c++17 " + env.get("CXXFLAGS", "") env["LDFLAGS"] = env.get("LDFLAGS", "") + f" -Wl,-rpath,{_rpath}" env["ORIGIN"] = "$ORIGIN" # if evaluated, it will still be '$ORIGIN'