Add copyright headers
diff --git a/.bazelci/presubmit.yml b/.bazelci/presubmit.yml
index 0707da9..f582512 100644
--- a/.bazelci/presubmit.yml
+++ b/.bazelci/presubmit.yml
@@ -52,7 +52,7 @@
build_targets:
- "//cc/..."
ubuntu_rule_based_toolchains:
- name: Linux rule-based toolchains
+ name: :ubuntu: Ubuntu rule-based toolchains
platform: ubuntu1804
working_directory: examples/rule_based_toolchain
build_flags:
diff --git a/examples/rule_based_toolchain/BUILD b/examples/rule_based_toolchain/BUILD
index b835735..c97e00b 100644
--- a/examples/rule_based_toolchain/BUILD
+++ b/examples/rule_based_toolchain/BUILD
@@ -1,3 +1,19 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+load("@rules_cc//cc:defs.bzl", "cc_test")
+
cc_test(
name = "quick_test",
srcs = ["quick_test.cc"],
diff --git a/examples/rule_based_toolchain/dynamic_answer/BUILD b/examples/rule_based_toolchain/dynamic_answer/BUILD
index ab86261..5894da0 100644
--- a/examples/rule_based_toolchain/dynamic_answer/BUILD
+++ b/examples/rule_based_toolchain/dynamic_answer/BUILD
@@ -1,3 +1,19 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+load("@rules_cc//cc:defs.bzl", "cc_library", "cc_shared_library")
+
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
diff --git a/examples/rule_based_toolchain/dynamic_answer/dynamic_answer.c b/examples/rule_based_toolchain/dynamic_answer/dynamic_answer.c
index a4256ac..247526b 100644
--- a/examples/rule_based_toolchain/dynamic_answer/dynamic_answer.c
+++ b/examples/rule_based_toolchain/dynamic_answer/dynamic_answer.c
@@ -1,3 +1,17 @@
+// Copyright 2024 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
#include "dynamic_answer.h"
int dynamic_answer(void) {
diff --git a/examples/rule_based_toolchain/dynamic_answer/public/dynamic_answer.h b/examples/rule_based_toolchain/dynamic_answer/public/dynamic_answer.h
index 2cf065a..c354758 100644
--- a/examples/rule_based_toolchain/dynamic_answer/public/dynamic_answer.h
+++ b/examples/rule_based_toolchain/dynamic_answer/public/dynamic_answer.h
@@ -1,3 +1,17 @@
+// Copyright 2024 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
#ifndef DYNAMIC_ANSWER_PUBLIC_DYNAMIC_ANSWER_H_
#define DYNAMIC_ANSWER_PUBLIC_DYNAMIC_ANSWER_H_
diff --git a/examples/rule_based_toolchain/quick_test.cc b/examples/rule_based_toolchain/quick_test.cc
index 665b93b..80737dd 100644
--- a/examples/rule_based_toolchain/quick_test.cc
+++ b/examples/rule_based_toolchain/quick_test.cc
@@ -1,3 +1,17 @@
+// Copyright 2024 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
#include <gtest/gtest.h>
#include "dynamic_answer.h"
diff --git a/examples/rule_based_toolchain/static_answer/BUILD b/examples/rule_based_toolchain/static_answer/BUILD
index cab59e9..beb1546 100644
--- a/examples/rule_based_toolchain/static_answer/BUILD
+++ b/examples/rule_based_toolchain/static_answer/BUILD
@@ -1,3 +1,19 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
+load("@rules_cc//cc:defs.bzl", "cc_library")
+
package(default_visibility = ["//visibility:public"])
licenses(["notice"]) # Apache 2.0
diff --git a/examples/rule_based_toolchain/static_answer/public/static_answer.h b/examples/rule_based_toolchain/static_answer/public/static_answer.h
index 667ef6c..a77c8e5 100644
--- a/examples/rule_based_toolchain/static_answer/public/static_answer.h
+++ b/examples/rule_based_toolchain/static_answer/public/static_answer.h
@@ -1,3 +1,17 @@
+// Copyright 2024 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
#ifndef STATIC_ANSWER_PUBLIC_STATIC_ANSWER_H_
#define STATIC_ANSWER_PUBLIC_STATIC_ANSWER_H_
diff --git a/examples/rule_based_toolchain/static_answer/static_answer.cc b/examples/rule_based_toolchain/static_answer/static_answer.cc
index 1f2e1cc..4f8a06f 100644
--- a/examples/rule_based_toolchain/static_answer/static_answer.cc
+++ b/examples/rule_based_toolchain/static_answer/static_answer.cc
@@ -1,3 +1,17 @@
+// Copyright 2024 The Bazel Authors. All rights reserved.
+//
+// Licensed under the Apache License, Version 2.0 (the "License");
+// you may not use this file except in compliance with the License.
+// You may obtain a copy of the License at
+//
+// http://www.apache.org/licenses/LICENSE-2.0
+//
+// Unless required by applicable law or agreed to in writing, software
+// distributed under the License is distributed on an "AS IS" BASIS,
+// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+// See the License for the specific language governing permissions and
+// limitations under the License.
+
#include "static_answer.h"
extern "C" int static_answer() {
diff --git a/examples/rule_based_toolchain/toolchain/BUILD b/examples/rule_based_toolchain/toolchain/BUILD
index 1f3fccc..f58aab7 100644
--- a/examples/rule_based_toolchain/toolchain/BUILD
+++ b/examples/rule_based_toolchain/toolchain/BUILD
@@ -1,3 +1,17 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
load("@rules_cc//cc/toolchains:args.bzl", "cc_args")
load("@rules_cc//cc/toolchains:toolchain.bzl", "cc_toolchain")
diff --git a/examples/rule_based_toolchain/toolchain/clang.BUILD b/examples/rule_based_toolchain/toolchain/clang.BUILD
index a548d25..3e27772 100644
--- a/examples/rule_based_toolchain/toolchain/clang.BUILD
+++ b/examples/rule_based_toolchain/toolchain/clang.BUILD
@@ -1,3 +1,17 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
load("@rules_cc//cc/toolchains:tool.bzl", "cc_tool")
load("@rules_cc//cc/toolchains:tool_map.bzl", "cc_tool_map")
load("@bazel_skylib//rules/directory:directory.bzl", "directory")
diff --git a/examples/rule_based_toolchain/toolchain/linux_sysroot.BUILD b/examples/rule_based_toolchain/toolchain/linux_sysroot.BUILD
index 904d48b..aa00dcb 100644
--- a/examples/rule_based_toolchain/toolchain/linux_sysroot.BUILD
+++ b/examples/rule_based_toolchain/toolchain/linux_sysroot.BUILD
@@ -1,3 +1,17 @@
+# Copyright 2024 The Bazel Authors. All rights reserved.
+#
+# Licensed under the Apache License, Version 2.0 (the "License");
+# you may not use this file except in compliance with the License.
+# You may obtain a copy of the License at
+#
+# http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+
load("@bazel_skylib//rules/directory:directory.bzl", "directory")
load("@bazel_skylib//rules/directory:subdirectory.bzl", "subdirectory")
load("@rules_cc//cc/toolchains/args:sysroot.bzl", "cc_sysroot")