utils icon indicating copy to clipboard operation
utils copied to clipboard

[WIP] cpubits: initial crate

Open tarcieri opened this issue 3 years ago • 3 comments

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 avatar Jan 08 '23 17:01 tarcieri

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)

tarcieri avatar Jan 08 '23 17:01 tarcieri

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

newpavlov avatar Feb 21 '25 09:02 newpavlov

Yes

tarcieri avatar Feb 21 '25 12:02 tarcieri