Skip to content

Conversation

@shayne-fletcher
Copy link
Contributor

Summary:
this is a patch of D84956118 where rust_binding_args = ["--"] is removed. setup-tools-rust inserts its own -- to pass flags to rustc (along with -Zthreads=...). our extra -- yields -- -- -Zthreads=16 ... so -Zthreads=16 is misparsed as a positional input.

... --crate-type cdylib -- -Zthreads=16 ...
                   ^^^^  ^^
                 (1st) (2nd)

Differential Revision: D84986921

Differential Revision: D84956118
@meta-cla meta-cla bot added the CLA Signed This label is managed by the Meta Open Source bot. label Oct 18, 2025
@meta-codesync
Copy link

meta-codesync bot commented Oct 18, 2025

@shayne-fletcher has exported this pull request. If you are a Meta employee, you can view the originating Diff in D84986921.

shayne-fletcher added a commit to shayne-fletcher/monarch-1 that referenced this pull request Oct 18, 2025
Summary:
Pull Request resolved: meta-pytorch#1611

this is a patch of D84956118 where initialization of `rust_binding_args = ["--"] ` is changed to `rust_binding_args=[]`.

`setup-tools-rust` inserts its own `--` to pass flags to `rustc` (along with `-Zthreads=...`).

our extra `--` yields `-- -- -Zthreads=16 ...` so `-Zthreads=16` is misparsed as a positional input:
```
... --crate-type cdylib -- -Zthreads=16 ...
                   ^^^^  ^^
                 (1st) (2nd)
```

Differential Revision: D84986921
Summary:
Pull Request resolved: meta-pytorch#1611

the goal is to inject an rpath into the built `_rust_bindings.so`. we put `-C link-args=-Wl,-rpath,<dir>` into `RUST_FLAGS`.

Differential Revision: D84986921
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Meta Open Source bot. fb-exported meta-exported

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants