3232 "GoLibrary" ,
3333 "GoSource" ,
3434)
35- load (
36- "//go/platform:crosstool.bzl" ,
37- "platform_from_crosstool" ,
38- )
3935
4036# A list of rules_go settings that are possibly set by go_transition.
4137# Keep their package name in sync with the implementation of
@@ -95,8 +91,6 @@ def _go_transition_impl(settings, attr):
9591
9692 goos = getattr (attr , "goos" , "auto" )
9793 goarch = getattr (attr , "goarch" , "auto" )
98- crosstool_top = settings .pop ("//command_line_option:crosstool_top" )
99- cpu = settings .pop ("//command_line_option:cpu" )
10094 _check_ternary ("pure" , pure )
10195 if goos != "auto" or goarch != "auto" :
10296 if goos == "auto" :
@@ -109,11 +103,6 @@ def _go_transition_impl(settings, attr):
109103 fail ('pure is "off" but cgo is not supported on {} {}' .format (goos , goarch ))
110104 platform = "@io_bazel_rules_go//go/toolchain:{}_{}{}" .format (goos , goarch , "_cgo" if cgo else "" )
111105 settings ["//command_line_option:platforms" ] = platform
112- else :
113- # If not auto, try to detect the platform the inbound crosstool/cpu.
114- platform = platform_from_crosstool (crosstool_top , cpu )
115- if platform :
116- settings ["//command_line_option:platforms" ] = platform
117106
118107 tags = getattr (attr , "gotags" , [])
119108 if tags :
@@ -171,8 +160,6 @@ request_nogo_transition = transition(
171160go_transition = transition (
172161 implementation = _go_transition_impl ,
173162 inputs = [
174- "//command_line_option:cpu" ,
175- "//command_line_option:crosstool_top" ,
176163 "//command_line_option:platforms" ,
177164 ] + TRANSITIONED_GO_SETTING_KEYS ,
178165 outputs = [
0 commit comments