aboutsummaryrefslogtreecommitdiffhomepage
path: root/tools/platforms
diff options
context:
space:
mode:
authorGravatar jcater <jcater@google.com>2017-06-20 21:22:58 +0200
committerGravatar Philipp Wollermann <philwo@google.com>2017-06-21 14:48:03 +0200
commitb6220e669a27cfecde9324bbe774970c720a0a1e (patch)
tree62debdfbc3995702c78d4b9148ca5407e7d18e72 /tools/platforms
parent2ba693ffbe824136a0ca5f47d34710612f6302c3 (diff)
Re-add host_platform and target_platform, and set them as defaults.
Part of #2219. PiperOrigin-RevId: 159596011
Diffstat (limited to 'tools/platforms')
-rw-r--r--tools/platforms/platforms.BUILD38
1 files changed, 38 insertions, 0 deletions
diff --git a/tools/platforms/platforms.BUILD b/tools/platforms/platforms.BUILD
index 6fb275d318..7059bd6d75 100644
--- a/tools/platforms/platforms.BUILD
+++ b/tools/platforms/platforms.BUILD
@@ -57,3 +57,41 @@ constraint_value(
# A default platform with nothing defined.
platform(name = "default_platform")
+
+# A default platform referring to the host system. This only exists for
+# internal build configurations, and so shouldn't be accessed by other packages.
+platform(
+ name = "host_platform",
+ cpu_constraints = [
+ ":x86_32",
+ ":x86_64",
+ ":ppc",
+ ":arm",
+ ":s390x",
+ ],
+ host_platform = True,
+ os_constraints = [
+ ":osx",
+ ":freebsd",
+ ":linux",
+ ":windows",
+ ],
+)
+
+platform(
+ name = "target_platform",
+ cpu_constraints = [
+ ":x86_32",
+ ":x86_64",
+ ":ppc",
+ ":arm",
+ ":s390x",
+ ],
+ os_constraints = [
+ ":osx",
+ ":freebsd",
+ ":linux",
+ ":windows",
+ ],
+ target_platform = True,
+)