-
-
Notifications
You must be signed in to change notification settings - Fork 685
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
Make cgo use standard C/C++ toolchain actions #1742
Labels
Comments
jayconrod
pushed a commit
to jayconrod/rules_go
that referenced
this issue
Oct 15, 2018
Previously, the internal go_context_data read C/C++ paths and options from the CcToolchainInfo provider. Most of the fields in this provider come from CROSSTOOL and will be removed in Bazel 0.20.0 (see https://docs.bazel.build/versions/master/skylark/backward-compatibility.html#disable-legacy-c-toolchain-api). This change migrates us to use the new cc_common module. This change is intended to be a quick fix to be backported to old release branches, so no architectural changes are made. Fixes bazel-contrib#1744 Related bazel-contrib#1742
jayconrod
added a commit
that referenced
this issue
Oct 16, 2018
Previously, the internal go_context_data read C/C++ paths and options from the CcToolchainInfo provider. Most of the fields in this provider come from CROSSTOOL and will be removed in Bazel 0.20.0 (see https://docs.bazel.build/versions/master/skylark/backward-compatibility.html#disable-legacy-c-toolchain-api). This change migrates us to use the new cc_common module. This change is intended to be a quick fix to be backported to old release branches, so no architectural changes are made. Fixes #1744 Related #1742
jayconrod
added a commit
that referenced
this issue
Oct 16, 2018
Previously, the internal go_context_data read C/C++ paths and options from the CcToolchainInfo provider. Most of the fields in this provider come from CROSSTOOL and will be removed in Bazel 0.20.0 (see https://docs.bazel.build/versions/master/skylark/backward-compatibility.html#disable-legacy-c-toolchain-api). This change migrates us to use the new cc_common module. This change is intended to be a quick fix to be backported to old release branches, so no architectural changes are made. Fixes #1744 Related #1742
jayconrod
added a commit
that referenced
this issue
Oct 16, 2018
Previously, the internal go_context_data read C/C++ paths and options from the CcToolchainInfo provider. Most of the fields in this provider come from CROSSTOOL and will be removed in Bazel 0.20.0 (see https://docs.bazel.build/versions/master/skylark/backward-compatibility.html#disable-legacy-c-toolchain-api). This change migrates us to use the new cc_common module. This change is intended to be a quick fix to be backported to old release branches, so no architectural changes are made. Fixes #1744 Related #1742
jayconrod
added a commit
that referenced
this issue
Oct 16, 2018
Previously, the internal go_context_data read C/C++ paths and options from the CcToolchainInfo provider. Most of the fields in this provider come from CROSSTOOL and will be removed in Bazel 0.20.0 (see https://docs.bazel.build/versions/master/skylark/backward-compatibility.html#disable-legacy-c-toolchain-api). This change migrates us to use the new cc_common module. This change is intended to be a quick fix to be backported to old release branches, so no architectural changes are made. Fixes #1744 Related #1742
jayconrod
added a commit
that referenced
this issue
Oct 16, 2018
Previously, the internal go_context_data read C/C++ paths and options from the CcToolchainInfo provider. Most of the fields in this provider come from CROSSTOOL and will be removed in Bazel 0.20.0 (see https://docs.bazel.build/versions/master/skylark/backward-compatibility.html#disable-legacy-c-toolchain-api). This change migrates us to use the new cc_common module. This change is intended to be a quick fix to be backported to old release branches, so no architectural changes are made. Fixes #1744 Related #1742
jayconrod
added a commit
that referenced
this issue
Oct 16, 2018
Previously, the internal go_context_data read C/C++ paths and options from the CcToolchainInfo provider. Most of the fields in this provider come from CROSSTOOL and will be removed in Bazel 0.20.0 (see https://docs.bazel.build/versions/master/skylark/backward-compatibility.html#disable-legacy-c-toolchain-api). This change migrates us to use the new cc_common module. This change is intended to be a quick fix to be backported to old release branches, so no architectural changes are made. Fixes #1744 Related #1742
jayconrod
added a commit
that referenced
this issue
Oct 16, 2018
Previously, the internal go_context_data read C/C++ paths and options from the CcToolchainInfo provider. Most of the fields in this provider come from CROSSTOOL and will be removed in Bazel 0.20.0 (see https://docs.bazel.build/versions/master/skylark/backward-compatibility.html#disable-legacy-c-toolchain-api). This change migrates us to use the new cc_common module. This change is intended to be a quick fix to be backported to old release branches, so no architectural changes are made. Fixes #1744 Related #1742
jayconrod
added a commit
that referenced
this issue
Oct 16, 2018
Previously, the internal go_context_data read C/C++ paths and options from the CcToolchainInfo provider. Most of the fields in this provider come from CROSSTOOL and will be removed in Bazel 0.20.0 (see https://docs.bazel.build/versions/master/skylark/backward-compatibility.html#disable-legacy-c-toolchain-api). This change migrates us to use the new cc_common module. This change is intended to be a quick fix to be backported to old release branches, so no architectural changes are made. Fixes #1744 Related #1742
I'm not sure what's left on this ticket. I think maybe the code that needed this was finally deleted in d31ac79 ? |
Yeah, this can be closed. |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Currently, when
cgo = True
ongo_library
,go_binary
, orgo_test
, we create a large graph of rules._cgo_codegen
rule that generates pure C and pure Go code.go_library
.cc_library
andcc_binary
. Objects are extracted out of the static library and packed into the .a file produced bygo_library
.This graph is repeated for every configuration that could affect the evaluation of build tags, so it has a significant overhead in analysis time. It's also hostile to
bazel query
, since there are a lot of targets that are less in the what to build category and more in the how to build it.Recently, Bazel exposed a lot more information about the C/C++ toolchain to Starlark rules. We should be able to incorporate cgo directly into the analysis code that implements
go_library
,go_binary
, andgo_test
. We should not need separate rules for code generation or C/C++ compilation.It may still be necessary to use
objc_library
to compile Objective C code, since the Objective C toolchain is not exposed.The text was updated successfully, but these errors were encountered: