src: each platform has a name, except for the default
authorAlexis Laferrière <alexis.laf@xymus.net>
Wed, 28 Jan 2015 14:40:10 +0000 (09:40 -0500)
committerAlexis Laferrière <alexis.laf@xymus.net>
Wed, 28 Jan 2015 14:42:36 +0000 (09:42 -0500)
Signed-off-by: Alexis Laferrière <alexis.laf@xymus.net>

src/platform/android.nit
src/platform/emscripten.nit
src/platform/platform.nit
src/platform/pnacl.nit

index 78ba820..98a017e 100644 (file)
@@ -34,6 +34,8 @@ end
 class AndroidPlatform
        super Platform
 
+       redef fun name do return "android"
+
        redef fun supports_libgc do return true
 
        redef fun supports_libunwind do return false
index dc2662f..3e9199a 100644 (file)
@@ -31,6 +31,7 @@ end
 class EmscriptenPlatform
        super Platform
 
+       redef fun name do return "emscripten"
        redef fun supports_libunwind do return false
        redef fun supports_libgc do return false
        redef fun supports_linker_script do return false
index 5b7f7a5..40069c4 100644 (file)
@@ -104,6 +104,10 @@ end
 #
 # Services will be added to this class in other modules.
 class Platform
+
+       # Simple lower-case name of the platform
+       fun name: nullable String do return null
+
        # Does the platform provide and support the library `unwind`?
        fun supports_libunwind: Bool do return true
 
index 9fceaad..d7103db 100644 (file)
@@ -31,6 +31,8 @@ end
 class PnaclPlatform
        super Platform
 
+       redef fun name do return "pnacl"
+
        redef fun supports_libunwind do return false
 
        redef fun no_main do return true