Skip to content
This repository has been archived by the owner on Jul 20, 2018. It is now read-only.

Failed to dectect apple as vendor for x86_64-apple-darwin #1

Closed
weiznich opened this issue Jan 18, 2017 · 4 comments
Closed

Failed to dectect apple as vendor for x86_64-apple-darwin #1

weiznich opened this issue Jan 18, 2017 · 4 comments

Comments

@weiznich
Copy link

I've trying to port the build system of ring from makefiles to a build.rs based system.
To better handle the the detection for which target ring is build, I use this crate. It's basically working, but there are strange ci-failures on macos. It seems like target_build_utils is unable to detect apple as vendor even if target is set to x86_64-apple-darwin. I'm not sure why this happen, there seems to be an test in this crate that also passes on my local machine.

@nagisa
Copy link
Owner

nagisa commented Jan 18, 2017

This crate essentially parses the output of rustc --print=cfg --target=x86_64-apple-darwin. Vendor missing either means I messed up badly writing the trivial parser, or the rustc simply prints incomplete cfg, like this:

$ rustup run stable rustc --print=cfg --target=x86_64-apple-darwin
target_os="macos"
target_family="unix"
target_arch="x86_64"
target_endian="little"
target_pointer_width="64"
target_env=""
unix
debug_assertions
▪rustup run stable rustc --version
rustc 1.14.0 (e8a012324 2016-12-16)

I’ll think what can be done about this.

@nagisa
Copy link
Owner

nagisa commented Jan 18, 2017

As a workaround, its probably best to check target_os == "macos" || target_os == "ios" instead.

@nagisa
Copy link
Owner

nagisa commented Jan 18, 2017

see rust-lang/rust#29718.

@nagisa
Copy link
Owner

nagisa commented Jan 18, 2017

Thanks for the report. I’ve published version 0.2.0 which contains d337924 and makes target_vendor to return Option.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants