Signed-off-by: Jean Privat <jean@pryen.org>
redef fun supports_libunwind do return false
+ redef fun supports_linker_script do return false
+
redef fun toolchain(toolcontext) do return new AndroidToolchain(toolcontext)
end
redef fun supports_libunwind do return false
redef fun supports_libgc do return false
+ redef fun supports_linker_script do return false
redef fun toolchain(toolcontext) do return new EnscriptenToolchain(toolcontext)
end
if m isa MEntity then
if modelbuilder.toolcontext.opt_inline_coloring_numbers.value then
self.provide_declaration(m.const_color, "#define {m.const_color} {color}")
- else if not modelbuilder.toolcontext.opt_colors_are_symbols.value then
+ else if not modelbuilder.toolcontext.opt_colors_are_symbols.value or not v.compiler.target_platform.supports_linker_script then
self.provide_declaration(m.const_color, "extern const int {m.const_color};")
v.add("const int {m.const_color} = {color};")
else
# 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