-
-
Notifications
You must be signed in to change notification settings - Fork 665
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
**What type of PR is this?** Starlark cleanup **What does this PR do? Why is it needed?** After the previous cleanups, `mode` and `GoConfigInfo` are pretty similar, the only differences were `link` vs `linkmode` and goos/goarch were missing on `GoConfigInfo`. So we add the default ones from the toolchain, and this lets us use the `GoConfigInfo` in the majority of cases without having to copy all the properties to `mode`. Another option is to move the `goos`/`goarch` from `mode` to top-level properties on `go_context`, though this is potentially a breaking change. Having them on GoConfigInfo seems like a reasonable direction to move in anyway if we plan to use Bazel's platforms to control what we target. This required aligning the `linkmode` name, which is good for consistency anyway. We pass in `goos`/`goarch` to `go_context` since they are only set in terminal rules and we don't need to look them up for intermediate libs. I also noticed `getattr` from the proto libs showing up in profiles, so we clean that up as well. This speeds up go_context another 2x, saving 100ms in buildbuddy repo **Which issues(s) does this PR fix?** Fixes # **Other notes for review**
- Loading branch information
Showing
11 changed files
with
115 additions
and
99 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.