-
-
Notifications
You must be signed in to change notification settings - Fork 666
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
Add iOS toolchains, platforms, and constraint_values #2090
Conversation
Refactored the description of target platforms. The source of truth is now the PLATFORMS table go/private/platforms.bzl. Declarations for config_settings in //go/platform; constraint_values and aliases in //go/toolchain; and toolchains in @go_sdk are generated from this table. In addition to the normal GOOS_GOARCH list, there are some additional entries for iOS. iOS platforms still have GOOS=darwin, but they are compatible with a different constraint_value (@bazel_tools//platforms:ios instead of @bazel_tools//platforms:osx). Fixes bazel-contrib#2079
@steeve Please take a look. This should make it possible to This is incomplete. I don't have a solution for |
I added a commit that should fix |
thank you! |
I tried constraining on |
Now I'm having issues on Android:
I suspect this is a problem in the NDK rules of Bazel. And on
|
Note that this happens also on bazel 0.25.3
|
cc @jin since he made the NDK rules |
Hum this is weird, when I constrain on |
Some explanation about the naming here: Anyway, you should be able to define a
I think the Android problems you're experiencing are #2089, which is affecting cross-compilation in general. I'm planning to fix that in another PR before the next release. |
This change makes the C/C++ toolchain dependency optional. This should enable cross-compilation when Bazel C/C++ toolchain selection is enabled. * There is a new constraint, //go/toolchain:cgo_constraint with values cgo_on and cgo_off. cgo_on is the default. * A platform is declared for each goos/goarch/cgo mode. For example, //go/toolchain:linux_amd64 and linux_amd64_cgo. * A toolchain is declared for each goos/goarch/cgo mode. For example, @go_sdk//:go_linux_amd64 and go_linux_amd64_cgo. * go_toolchains now optionally depend on //:cgo_context_data, a target that extracts information from a required C/C++ toolchain. This is the only direct contact with the C/C++ toolchain. * get_mode is slightly adjusted to select pure mode when there is no C/C++ toolchain or when it is likely to be misconfigured. * Everything else is fixed not to expect the C/C++ toolchain to exist in pure mode.
Refactored the description of target platforms. The source of truth is
now the PLATFORMS table go/private/platforms.bzl. Declarations for
config_settings in //go/platform; constraint_values and aliases in
//go/toolchain; and toolchains in @go_sdk are generated from this
table.
In addition to the normal GOOS_GOARCH list, there are some additional
entries for iOS. iOS platforms still have GOOS=darwin, but they are
compatible with a different constraint_value
(@bazel_tools//platforms:ios instead of @bazel_tools//platforms:osx).
Fixes #2079