diff --git a/go/private/actions/stdlib.bzl b/go/private/actions/stdlib.bzl index 6725c4134d..ee467f4004 100644 --- a/go/private/actions/stdlib.bzl +++ b/go/private/actions/stdlib.bzl @@ -75,14 +75,11 @@ def _sdk_stdlib(go): def _build_stdlib(go): pkg = go.declare_directory(go, path = "pkg") - src = go.declare_directory(go, path = "src") - root_file = go.declare_file(go, path = "ROOT") args = go.builder_args(go, "stdlib") - args.add("-out", root_file.dirname) + args.add("-out", pkg.dirname) if go.mode.race: args.add("-race") args.add_all(link_mode_args(go.mode)) - go.actions.write(root_file, "") env = go.env if go.mode.pure: env.update({"CGO_ENABLED": "0"}) @@ -105,7 +102,7 @@ def _build_stdlib(go): go.sdk.tools + [go.sdk.go, go.sdk.package_list, go.sdk.root_file] + go.crosstool) - outputs = [pkg, src] + outputs = [pkg] go.actions.run( inputs = inputs, outputs = outputs, @@ -117,5 +114,5 @@ def _build_stdlib(go): return GoStdLib( _list_json = _build_stdlib_list_json(go), libs = [pkg], - root_file = root_file, + root_file = pkg, ) diff --git a/go/providers.rst b/go/providers.rst index 3f903c69e6..dccc0e1edc 100644 --- a/go/providers.rst +++ b/go/providers.rst @@ -428,7 +428,7 @@ from GoSDK_, or it may be another library compiled for the target mode. +--------------------------------+-----------------------------------------------------------------+ | :param:`root_file` | :type:`File` | +--------------------------------+-----------------------------------------------------------------+ -| A file in the standard library root directory. Used to determine ``GOROOT``. | +| A file or directory in the standard library root directory. Used to determine ``GOROOT``. | +--------------------------------+-----------------------------------------------------------------+ | :param:`libs` | :type:`list of File` | +--------------------------------+-----------------------------------------------------------------+