sep_comp: declare method __attribute__((weak)) to allow skip of undead methods
authorJean Privat <jean@pryen.org>
Wed, 17 Jun 2015 01:34:09 +0000 (21:34 -0400)
committerJean Privat <jean@pryen.org>
Wed, 17 Jun 2015 12:42:17 +0000 (08:42 -0400)
Signed-off-by: Jean Privat <jean@pryen.org>

src/compiler/separate_compiler.nit

index b971cdb..b1e08c8 100644 (file)
@@ -2214,7 +2214,7 @@ class SeparateRuntimeFunction
                var mmethoddef = self.mmethoddef
 
                var sig = "{c_ret} {c_name}{c_sig}"
-               compiler.provide_declaration(self.c_name, "{sig};")
+               compiler.provide_declaration(self.c_name, "{sig} __attribute__((weak));")
 
                var rta = compiler.as(SeparateCompiler).runtime_type_analysis
                if rta != null and not rta.live_mmodules.has(mmethoddef.mclassdef.mmodule) then