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

macOS now uses SecRandomCopyBytes for us #721

Closed
wants to merge 1 commit into from

Conversation

RalfJung
Copy link
Member

@RalfJung RalfJung commented May 2, 2019

This builds on top of rust-lang/rust#60156.

Fixes #686

@RalfJung
Copy link
Member Author

RalfJung commented May 2, 2019

Uh, dang. Maybe that was not such a good idea:

  = note: Undefined symbols for architecture x86_64:
            "_SecRandomCopyBytes", referenced from:
                std::sys::unix::rand::hashmap_random_keys::hbdc7ddba9ddf117d in std.std.8sfdv10m-cgu.6.rcgu.o
          ld: symbol(s) not found for architecture x86_64
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

@ebarnard had the same problem with rust-lang/rust#59879, I wonder if we can apply their solution conditionally. They added cargo:rustc-link-lib=framework=Security to the build script output; can that depend on features?

@oli-obk
Copy link
Contributor

oli-obk commented May 2, 2019

can that depend on features?

You should be able to use CARGO_CFG_<cfg> according to the docs https://doc.rust-lang.org/cargo/reference/environment-variables.html#environment-variables-cargo-sets-for-build-scripts

@RalfJung
Copy link
Member Author

RalfJung commented May 2, 2019

This is not a "configuration option" of libstd though, it's a --cfg miri passed via RUSTFLAGS.

@RalfJung RalfJung closed this May 4, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Implement libstd HashMap seeding on OS X
2 participants