-
Notifications
You must be signed in to change notification settings - Fork 138
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
Retrieve single arch cpu from cc_toolchain
instead of from apple_fragment
#694
Retrieve single arch cpu from cc_toolchain
instead of from apple_fragment
#694
Conversation
Do you feel this is a bug with |
It could be, but I think it's safe to use this as it's the one cc_library and objc_library use. |
8accbc9
to
96c3009
Compare
…ragment` `apple_fragment.single_arch_cpu` is returning the default macos cpu for the host platform for tools while it should return the cpu of the execution platform.
96c3009
to
a76e7d3
Compare
I think now that this might be fixed by the change like this bazelbuild/rules_apple#1154 we should try that first |
Now that bazelbuild/rules_apple#1154 is merged, is this still an issue? |
Yes, still. I think this is a Bazel issue, since rules_swift doesn't depend on rules_apple. |
Yep, we have to use this patch as well until Bazel fixes it's stuff. Doesn't look like anyone is looking at it over there so low chance of a 5.0 fix? |
Can you test this with bazel HEAD in general? A quick look at the bazel source makes it look like the defaults read from https://github.com/bazelbuild/bazel/blob/c873525af9e045c87dfca2ac82ca68e9b76f8820/src/main/java/com/google/devtools/build/lib/rules/apple/AppleConfiguration.java#L82 and https://github.com/bazelbuild/bazel/blob/c873525af9e045c87dfca2ac82ca68e9b76f8820/src/main/java/com/google/devtools/build/lib/rules/apple/AppleCommandLineOptions.java#L201-L203 |
Edit: See other comments below. |
|
Sorry, above two comments were incorrect. I was testing it wrong due to a bug in bazelisk - it is pulling x86_64 binaries for unreleased commit on M1 bazelbuild/bazelisk#260 Update: It has not been fixed at HEAD. |
I say we merge this, to fix the issue, and revert when Bazel gets a fix. |
Does no one else have this problem? We're still not able to build with universal tools without this patch. |
Yes, we need this patch to build universal tools. My comment still stands, I think we should merge it for now. |
Thanks 🙏 |
…ragment` (bazelbuild#694) `apple_fragment.single_arch_cpu` is returning the default macos cpu for the host platform for tools while it should return the cpu of the execution platform.
…`apple_fragment` (bazelbuild#694)" This reverts commit 918a4d6.
apple_fragment.single_arch_cpu
was returning the default macos cpu forthe host platform for tools while it should return the cpu of the
execution platform.