Generate code that is buildifier compliant
Load statements should be at the top of the file
Closes #13296.
PiperOrigin-RevId: 366964324
diff --git a/tools/cpp/BUILD.empty.tpl b/tools/cpp/BUILD.empty.tpl
index 2f7b93c..3c89a1f 100644
--- a/tools/cpp/BUILD.empty.tpl
+++ b/tools/cpp/BUILD.empty.tpl
@@ -12,10 +12,10 @@
# See the License for the specific language governing permissions and
# limitations under the License.
-package(default_visibility = ["//visibility:public"])
-
load(":cc_toolchain_config.bzl", "cc_toolchain_config")
+package(default_visibility = ["//visibility:public"])
+
cc_library(
name = "malloc",
)
diff --git a/tools/cpp/BUILD.static.bsd b/tools/cpp/BUILD.static.bsd
index 2e02dbf..d693b27 100644
--- a/tools/cpp/BUILD.static.bsd
+++ b/tools/cpp/BUILD.static.bsd
@@ -14,11 +14,11 @@
# This becomes the BUILD file for @local_config_cc// under FreeBSD and OpenBSD.
-package(default_visibility = ["//visibility:public"])
-
load(":cc_toolchain_config.bzl", "cc_toolchain_config")
load("@rules_cc//cc:defs.bzl", "cc_toolchain_suite", "cc_toolchain", "cc_library")
+package(default_visibility = ["//visibility:public"])
+
cc_library(
name = "malloc",
)
diff --git a/tools/cpp/BUILD.tools b/tools/cpp/BUILD.tools
index d1234ac..3a85d5f 100644
--- a/tools/cpp/BUILD.tools
+++ b/tools/cpp/BUILD.tools
@@ -12,12 +12,12 @@
# See the License for the specific language governing permissions and
# limitations under the License.
+load(":cc_toolchain_config.bzl", "cc_toolchain_config")
+
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
-load(":cc_toolchain_config.bzl", "cc_toolchain_config")
-
# The toolchain type used to distinguish cc toolchains.
toolchain_type(name = "toolchain_type")
diff --git a/tools/cpp/BUILD.tpl b/tools/cpp/BUILD.tpl
index d3514d1..ab72a06 100644
--- a/tools/cpp/BUILD.tpl
+++ b/tools/cpp/BUILD.tpl
@@ -14,12 +14,12 @@
# This becomes the BUILD file for @local_config_cc// under non-BSD unixes.
-package(default_visibility = ["//visibility:public"])
-
load(":cc_toolchain_config.bzl", "cc_toolchain_config")
load(":armeabi_cc_toolchain_config.bzl", "armeabi_cc_toolchain_config")
load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite")
+package(default_visibility = ["//visibility:public"])
+
licenses(["notice"]) # Apache 2.0
cc_library(
diff --git a/tools/cpp/BUILD.windows.tpl b/tools/cpp/BUILD.windows.tpl
index 7c00426..9a249ce 100644
--- a/tools/cpp/BUILD.windows.tpl
+++ b/tools/cpp/BUILD.windows.tpl
@@ -14,11 +14,12 @@
# This becomes the BUILD file for @local_config_cc// under Windows.
-package(default_visibility = ["//visibility:public"])
-
load("@rules_cc//cc:defs.bzl", "cc_toolchain", "cc_toolchain_suite", "cc_library")
load(":windows_cc_toolchain_config.bzl", "cc_toolchain_config")
load(":armeabi_cc_toolchain_config.bzl", "armeabi_cc_toolchain_config")
+
+package(default_visibility = ["//visibility:public"])
+
cc_library(
name = "malloc",
)