Skip to content

Commit eac6ce1

Browse files
authored
Append to, rather than replace, existing RUSTFLAGS when building (#103)
1 parent 991de4c commit eac6ce1

File tree

2 files changed

+2
-1
lines changed

2 files changed

+2
-1
lines changed

CHANGELOG.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44

55
- Respect `PYO3_PYTHON` and `PYTHON_SYS_EXECUTABLE` environment variables if set. [#96](https://github.com/PyO3/setuptools-rust/pull/96)
66
- Add runtime dependency on setuptools >= 46.1. [#102](https://github.com/PyO3/setuptools-rust/pull/102)
7+
- Append to, rather than replace, existing RUSTFLAGS when building. [#103](https://github.com/PyO3/setuptools-rust/pull/103)
78

89
## 0.11.6 (2020-12-13)
910

setuptools_rust/build.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,7 @@ def build_extension(self, ext):
186186
rustflags += " -C target-cpu=native"
187187

188188
if rustflags:
189-
env["RUSTFLAGS"] = rustflags
189+
env["RUSTFLAGS"] = (env.get("RUSTFLAGS", "") + " " + rustflags).strip()
190190

191191
# Execute cargo
192192
try:

0 commit comments

Comments
 (0)