TARGET_CPU values inconsistent on Linux, OS X
x86-64-linux $ ./output/bazel info --show_make_env | grep TARGET_CPU TARGET_CPU: local
darwin $ ./output/bazel info --show_make_env | grep TARGET_CPU TARGET_CPU: darwin
I would have expected TARGET_CPU on x86-64 Linux to be 'k8'. I would like to use $(TARGET_CPU) to reference platform specific source directories, but 'local' is too generic for this purpose.
If you use select(), you can name the directories however you like, and have the select map from the bazel name to the actual name. I'd expect a lot of people to use gnu triplets.
That said, what we currently use for 'cpu' is terrible, and we have plans to revamp this entirely.
On Tue, Apr 14, 2015 at 1:40 AM, kayasoze [email protected] wrote:
x86-64-linux $ ./output/bazel info --show_make_env | grep TARGET_CPU TARGET_CPU: local
darwin $ ./output/bazel info --show_make_env | grep TARGET_CPU TARGET_CPU: darwin
I would have expected TARGET_CPU on x86-64 Linux to be 'k8'. I would like to use $(TARGET_CPU) to reference platform specific source directories, but 'local' is too generic for this purpose.
— Reply to this email directly or view it on GitHub https://github.com/google/bazel/issues/119.
@katre Will this still be an issue when platforms/toolchains are complete?
In the very long term, as we remove uses for the --cpu flag, yes, but that's not going to be anytime soon.
I am currently getting 'k8' on linux - is this complete?
No, we still are not ready to deprecate the --cpu flag or the target_cpu value.
Should we close this as obsolete because so much has changed?
SGTM