Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Incorrect RUSTFLAGS parsing (part deux) #8614

Closed
lrascao opened this issue Aug 12, 2020 · 3 comments
Closed

Incorrect RUSTFLAGS parsing (part deux) #8614

lrascao opened this issue Aug 12, 2020 · 3 comments
Labels
C-bug Category: bug

Comments

@lrascao
Copy link

lrascao commented Aug 12, 2020

Problem/Steps

% cargo new aa
% cd aa
$ RUSTFLAGS="--codegen link-args='-flat_namespace -undefined suppress'" cargo build

error: failed to run `rustc` to learn about target-specific information

Caused by:
  process didn't exit successfully: `rustc - --crate-name ___ --print=file-names --codegen 'link-args='\''-flat_namespace' -undefined 'suppress'\''' --crate-type bin --crate-type rlib --crate-type dylib --
crate-type cdylib --crate-type staticlib --crate-type proc-macro --print=sysroot --print=cfg` (exit code: 1)
--- stderr
error: Unrecognized option: 'u'

(Ugly) Alternative that does work:

RUSTFLAGS="--codegen link-arg=-flat_namespace --codegen link-arg=-undefined --codegen link-arg=suppress" cargo build
   Compiling aa v0.1.0 (/private/tmp/aa)
    Finished dev [unoptimized + debuginfo] target(s) in 1.29s

Notes

$ cargo --version
cargo 1.41.0 (626f0f4 2019-12-03)

@lrascao lrascao added the C-bug Category: bug label Aug 12, 2020
@lrascao
Copy link
Author

lrascao commented Aug 12, 2020

Previous discussion of same issue here

@ehuss
Copy link
Contributor

ehuss commented Aug 12, 2020

Hi, thanks for the report! I'm going to close this as a duplicate of #6139, #3686, and #7406. See #7406 for a nightly-only option which allows TOML syntax in environment variables.

@ehuss ehuss closed this as completed Aug 12, 2020
@lrascao
Copy link
Author

lrascao commented Aug 12, 2020

👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-bug Category: bug
Projects
None yet
Development

No branches or pull requests

2 participants