summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKeith Smiley <keithbsmiley@gmail.com>2024-04-03 11:18:47 -0700
committerGitHub <noreply@github.com>2024-04-03 11:18:47 -0700
commitd59a3e0fa67ff097182165d3f3b6910c450ea92a (patch)
tree12871aaf3ce16e3676cb92832f6739a90a774dc2
parentcf271a330b08a3bbd8ad61241d03787683d5a1c5 (diff)
downloadbazelbuild-apple_support-d59a3e0fa67ff097182165d3f3b6910c450ea92a.tar.gz
Add stubs for the Xcode rules in apple_support, for eventual migration from Bazel. (#312)
This change only stubs out rules; providers and flags will come later. The providers in particular need some more thought before locking down their names, since the current names (like `apple_common.XcodeVersionConfig`) don't meet Starlark provider naming conventions. PiperOrigin-RevId: 612472977 (cherry picked from commit 217743145706a70a516987279a8027819ae892cb) Co-authored-by: Tony Allevato <allevato@google.com>
-rw-r--r--BUILD1
-rw-r--r--xcode/BUILD39
-rw-r--r--xcode/available_xcodes.bzl24
-rw-r--r--xcode/xcode_config.bzl24
-rw-r--r--xcode/xcode_config_alias.bzl24
-rw-r--r--xcode/xcode_version.bzl24
6 files changed, 136 insertions, 0 deletions
diff --git a/BUILD b/BUILD
index 0bec7d4..a262941 100644
--- a/BUILD
+++ b/BUILD
@@ -33,6 +33,7 @@ filegroup(
"//platforms:for_bazel_tests",
"//rules:for_bazel_tests",
"//tools:for_bazel_tests",
+ "//xcode:for_bazel_tests",
],
# Exposed publicly just so other rules can use this if they set up
# integration tests that need to copy all the support files into
diff --git a/xcode/BUILD b/xcode/BUILD
new file mode 100644
index 0000000..78c5cc9
--- /dev/null
+++ b/xcode/BUILD
@@ -0,0 +1,39 @@
+load("@bazel_skylib//:bzl_library.bzl", "bzl_library")
+
+licenses(["notice"])
+
+package(
+ default_visibility = ["//visibility:public"],
+)
+
+bzl_library(
+ name = "available_xcodes",
+ srcs = ["available_xcodes.bzl"],
+ visibility = ["//visibility:private"],
+)
+
+bzl_library(
+ name = "xcode_config",
+ srcs = ["xcode_config.bzl"],
+ visibility = ["//visibility:private"],
+)
+
+bzl_library(
+ name = "xcode_config_alias",
+ srcs = ["xcode_config_alias.bzl"],
+ visibility = ["//visibility:private"],
+)
+
+bzl_library(
+ name = "xcode_version",
+ srcs = ["xcode_version.bzl"],
+ visibility = ["//visibility:private"],
+)
+
+# Consumed by bazel tests.
+filegroup(
+ name = "for_bazel_tests",
+ testonly = True,
+ srcs = glob(["**"]),
+ visibility = ["//:__pkg__"],
+)
diff --git a/xcode/available_xcodes.bzl b/xcode/available_xcodes.bzl
new file mode 100644
index 0000000..ec0adfd
--- /dev/null
+++ b/xcode/available_xcodes.bzl
@@ -0,0 +1,24 @@
+# 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.
+
+"""Implementation of the `available_xcodes` build rule."""
+
+visibility("public")
+
+def available_xcodes(name, **kwargs):
+ # TODO: b/311385128 - Migrate the native implementation here.
+ native.available_xcodes(
+ name = name,
+ **kwargs
+ )
diff --git a/xcode/xcode_config.bzl b/xcode/xcode_config.bzl
new file mode 100644
index 0000000..5d4a855
--- /dev/null
+++ b/xcode/xcode_config.bzl
@@ -0,0 +1,24 @@
+# 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.
+
+"""Implementation of the `xcode_config` build rule."""
+
+visibility("public")
+
+def xcode_config(name, **kwargs):
+ # TODO: b/311385128 - Migrate the native implementation here.
+ native.xcode_config(
+ name = name,
+ **kwargs
+ )
diff --git a/xcode/xcode_config_alias.bzl b/xcode/xcode_config_alias.bzl
new file mode 100644
index 0000000..b0ed996
--- /dev/null
+++ b/xcode/xcode_config_alias.bzl
@@ -0,0 +1,24 @@
+# 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.
+
+"""Implementation of the `xcode_config_alias` build rule."""
+
+visibility("public")
+
+def xcode_config_alias(name, **kwargs):
+ # TODO: b/311385128 - Migrate the native implementation here.
+ native.xcode_config_alias(
+ name = name,
+ **kwargs
+ )
diff --git a/xcode/xcode_version.bzl b/xcode/xcode_version.bzl
new file mode 100644
index 0000000..a91b567
--- /dev/null
+++ b/xcode/xcode_version.bzl
@@ -0,0 +1,24 @@
+# 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.
+
+"""Implementation of the `xcode_version` build rule."""
+
+visibility("public")
+
+def xcode_version(name, **kwargs):
+ # TODO: b/311385128 - Migrate the native implementation here.
+ native.xcode_version(
+ name = name,
+ **kwargs
+ )