Skip to content

Commit e48d48f

Browse files
committed
Fix broken cargo home
1 parent 09a0f1a commit e48d48f

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

relenv/buildenv.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -113,8 +113,9 @@ def buildenv(
113113
"OPENSSL_INCLUDE_DIR": f"{relenv_path}/include",
114114
"OPENSSL_LIB_DIR": f"{relenv_path}/lib",
115115
"PKG_CONFIG_PATH": f"{relenv_path}/lib/pkgconfig",
116+
"RUSTFLAGS": f"-L {relenv_path}/lib -C link-arg=-Wl,-rpath,{relenv_path}/lib",
116117
}
117-
if sys.platform == "dawin":
118+
if sys.platform == "darwin":
118119
env["MACOS_DEVELOPMENT_TARGET"] = MACOS_DEVELOPMENT_TARGET
119120
return env
120121

relenv/runtime.py

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -701,10 +701,9 @@ def wrap(func: Callable[..., Any]) -> Callable[..., Any]:
701701
def wrapper(*args: Any, **kwargs: Any) -> Any:
702702
if sys.platform != "linux":
703703
return func(*args, **kwargs)
704-
base_dir = common().DATA_DIR / "toolchain"
705-
toolchain = base_dir / common().get_triplet()
704+
toolchain = common().get_toolchain()
706705
cargo_home = str(common().DATA_DIR / "cargo")
707-
if not toolchain.exists():
706+
if toolchain is None or not toolchain.exists():
708707
debug("Unable to set CARGO_HOME no toolchain exists")
709708
else:
710709
relenvroot = str(sys.RELENV)

0 commit comments

Comments
 (0)