From e6cc20ebdd90c3c73f3638e0ee2b19c1937454ce Mon Sep 17 00:00:00 2001 From: Daan de Graaf Date: Wed, 27 Feb 2019 12:51:49 +0100 Subject: [PATCH 1/2] Add OS type "none" to platforms. --- src/main/java/com/google/devtools/build/lib/util/OS.java | 1 + tools/platforms/BUILD | 5 +++++ tools/platforms/platforms.BUILD | 5 +++++ 3 files changed, 11 insertions(+) diff --git a/src/main/java/com/google/devtools/build/lib/util/OS.java b/src/main/java/com/google/devtools/build/lib/util/OS.java index 317f4e30b02768..bf3a9ff547efe5 100644 --- a/src/main/java/com/google/devtools/build/lib/util/OS.java +++ b/src/main/java/com/google/devtools/build/lib/util/OS.java @@ -23,6 +23,7 @@ public enum OS { FREEBSD("freebsd", "FreeBSD"), LINUX("linux", "Linux"), WINDOWS("windows", "Windows"), + NONE("none", "No OS"), UNKNOWN("unknown", ""); private static final EnumSet POSIX_COMPATIBLE = EnumSet.of(DARWIN, FREEBSD, LINUX); diff --git a/tools/platforms/BUILD b/tools/platforms/BUILD index da6f476adb8565..13f7ff6a41709b 100644 --- a/tools/platforms/BUILD +++ b/tools/platforms/BUILD @@ -82,6 +82,11 @@ constraint_value( constraint_setting = ":os", ) +constraint_value( + name = "none", + constraint_setting = ":os", +) + # A default platform with nothing defined. platform(name = "default_platform") diff --git a/tools/platforms/platforms.BUILD b/tools/platforms/platforms.BUILD index 862c554f8e7222..9a207a9eb095c2 100644 --- a/tools/platforms/platforms.BUILD +++ b/tools/platforms/platforms.BUILD @@ -70,6 +70,11 @@ constraint_value( constraint_setting = ":os", ) +constraint_value( + name = "none", + constraint_setting = ":os", +) + # A default platform with nothing defined. platform(name = "default_platform") From 8132e00a910ffd590a8a1a9ee3a7753cadbd699d Mon Sep 17 00:00:00 2001 From: Daan de Graaf Date: Wed, 13 Mar 2019 10:17:52 +0100 Subject: [PATCH 2/2] Remove the `NONE` case from the OS enum. The `none` os constraint value remains as a standard platform. While names such as 'freestanding' or 'standalone' have been proposed, the name remains 'none' to be consistent with the naming of targets triples such as 'arm-none-eabi' that will satisfy this constaint. --- src/main/java/com/google/devtools/build/lib/util/OS.java | 1 - 1 file changed, 1 deletion(-) diff --git a/src/main/java/com/google/devtools/build/lib/util/OS.java b/src/main/java/com/google/devtools/build/lib/util/OS.java index bf3a9ff547efe5..317f4e30b02768 100644 --- a/src/main/java/com/google/devtools/build/lib/util/OS.java +++ b/src/main/java/com/google/devtools/build/lib/util/OS.java @@ -23,7 +23,6 @@ public enum OS { FREEBSD("freebsd", "FreeBSD"), LINUX("linux", "Linux"), WINDOWS("windows", "Windows"), - NONE("none", "No OS"), UNKNOWN("unknown", ""); private static final EnumSet POSIX_COMPATIBLE = EnumSet.of(DARWIN, FREEBSD, LINUX);