Platform
represent the target platform of a compilationServices will be added to this class in other modules.
nitc :: Platform :: defaultinit
nitc :: Platform :: supports_libgc
Does the platform provide and supports the Boehm's GC library?nitc :: Platform :: supports_libunwind
Does the platform provide and support the libraryunwind
?
nitc :: Platform :: supports_linker_script
Does the platform accepts linker scripts?core :: Object :: class_factory
Implementation used byget_class
to create the specific class.
core :: Object :: defaultinit
nitc :: Platform :: defaultinit
core :: Object :: is_same_instance
Return true ifself
and other
are the same instance (i.e. same identity).
core :: Object :: is_same_serialized
Isself
the same as other
in a serialization context?
core :: Object :: is_same_type
Return true ifself
and other
have the same dynamic type.
core :: Object :: native_class_name
The class name of the object in CString format.core :: Object :: output_class_name
Display class name on stdout (debug only).nitc :: Platform :: supports_libgc
Does the platform provide and supports the Boehm's GC library?nitc :: Platform :: supports_libunwind
Does the platform provide and support the libraryunwind
?
nitc :: Platform :: supports_linker_script
Does the platform accepts linker scripts?
# Sub-classes of `Platform` represent the target platform of a compilation
#
# 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
# Does the platform provide and supports the Boehm's GC library?
fun supports_libgc: Bool do return true
# Does this platform declare its own main function? If so, we won't generate one in Nit.
fun no_main: Bool do return false
# Does the platform accepts linker scripts?
fun supports_linker_script: Bool do return true
end
src/platform/platform.nit:105,1--124,3
redef class Platform
# The specific tool-chain associated to the platform
fun toolchain(toolcontext: ToolContext, compiler: AbstractCompiler): Toolchain
do
return new MakefileToolchain(toolcontext, compiler)
end
end
src/compiler/abstract_compiler.nit:130,1--136,3