Skip to content
New issue

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

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

Already on GitHub? # to your account

[WIP] cpubits: initial crate #826

Draft
wants to merge 1 commit into
base: master
Choose a base branch
from
Draft

[WIP] cpubits: initial crate #826

wants to merge 1 commit into from

Conversation

tarcieri
Copy link
Member

@tarcieri tarcieri commented Jan 8, 2023

As discussed in #824, adds a crate with the intent of it providing heuristics for selecting whether 32-bit or 64-bit backends have optimal codegen for a given target, with optional overrides.

The intended use of this crate is in build-dependencies, where it can emit a cfg attribute (e.g. --cfg cpubits="64") if one hasn't been explicitly specified already, and all gating on 32-bit vs 64-bit backends can simply use the cfg attribute.

@tarcieri
Copy link
Member Author

tarcieri commented Jan 8, 2023

Wow, what is this (unrelated) failure in cpufeatures when building on macOS:

https://github.com/RustCrypto/utils/actions/runs/3868175503/jobs/6593444420#step:6:13

  = note: ld: in /Users/runner/.rustup/toolchains/1.40.0-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libgetopts-1988d9ef7be544ff.rlib(rust.metadata.bin), archive member 'rust.metadata.bin' with length 198423 is not mach-o or llvm bitcode file '/Users/runner/.rustup/toolchains/1.40.0-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libgetopts-1988d9ef7be544ff.rlib'
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

Also this in zeroize:

https://github.com/RustCrypto/utils/actions/runs/3868175523/jobs/6593445047#step:7:13

 = note: ld: in /Users/runner/.rustup/toolchains/1.51.0-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libgetopts-a912bc5fe101e362.rlib(lib.rmeta), archive member 'lib.rmeta' with length 203848 is not mach-o or llvm bitcode file '/Users/runner/.rustup/toolchains/1.51.0-x86_64-apple-darwin/lib/rustlib/x86_64-apple-darwin/lib/libgetopts-a912bc5fe101e362.rlib'
          clang: error: linker command failed with exit code 1 (use -v to see invocation)

As discussed in #824, adds a crate with the intent of it providing
heuristics for selecting whether 32-bit or 64-bit backends have optimal
codegen for a given target, with optional overrides.

The intended use of this crate is in `build-dependencies`, where it can
emit a `cfg` attribute (e.g. `--cfg cpubits="64"`) if one hasn't been
explicitly specified already, and all gating on 32-bit vs 64-bit
backends can simply use the `cfg` attribute.
@newpavlov
Copy link
Member

@tarcieri
Do you still plan to move forward with this PR? It got quite stale and we probably can close it.

@tarcieri
Copy link
Member Author

Yes

# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants