Mercurial > hg
changeset 42458:8ee0fdf3b087
rust-cpython: fix build for MacOSX
MacOSX needs special link flags. Quoting the README of rust-cpython:
create a `.cargo/config` with the following content:
```
[target.x86_64-apple-darwin]
rustflags = [
"-C", "link-arg=-undefined",
"-C", "link-arg=dynamic_lookup",
]
```
This is tested with Python 2.7 (Anaconda install) and Python 3
(Homebrew install)
author | Georges Racinet <georges.racinet@octobus.net> |
---|---|
date | Fri, 14 Jun 2019 11:18:06 +0100 |
parents | f4a65077e949 |
children | 85041e2b69c7 |
files | setup.py |
diffstat | 1 files changed, 3 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/setup.py Fri Jun 14 10:57:07 2019 +0100 +++ b/setup.py Fri Jun 14 11:18:06 2019 +0100 @@ -1199,6 +1199,9 @@ if sys.version_info[0] == 3 and self.py3_features is not None: cargocmd.extend(('--features', self.py3_features, '--no-default-features')) + if sys.platform == 'darwin': + env['RUSTFLAGS'] = ("-C link-arg=-undefined " + "-C link-arg=dynamic_lookup") try: subprocess.check_call(cargocmd, env=env, cwd=self.rustsrcdir) except OSError as exc: