|
|
@ -332,6 +332,7 @@ class CLikeCompiler: |
|
|
|
#ifndef {symbol} |
|
|
|
#ifndef {symbol} |
|
|
|
{symbol}; |
|
|
|
{symbol}; |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
return 0; |
|
|
|
}}''' |
|
|
|
}}''' |
|
|
|
return self.compiles(t.format(**fargs), env, extra_args=extra_args, |
|
|
|
return self.compiles(t.format(**fargs), env, extra_args=extra_args, |
|
|
|
dependencies=dependencies) |
|
|
|
dependencies=dependencies) |
|
|
@ -555,6 +556,7 @@ class CLikeCompiler: |
|
|
|
{prefix} |
|
|
|
{prefix} |
|
|
|
int main() {{ |
|
|
|
int main() {{ |
|
|
|
{type} something; |
|
|
|
{type} something; |
|
|
|
|
|
|
|
return 0; |
|
|
|
}}''' |
|
|
|
}}''' |
|
|
|
if not self.compiles(t.format(**fargs), env, extra_args=extra_args, |
|
|
|
if not self.compiles(t.format(**fargs), env, extra_args=extra_args, |
|
|
|
dependencies=dependencies)[0]: |
|
|
|
dependencies=dependencies)[0]: |
|
|
@ -633,6 +635,7 @@ class CLikeCompiler: |
|
|
|
#include <stdio.h> |
|
|
|
#include <stdio.h> |
|
|
|
int main() {{ |
|
|
|
int main() {{ |
|
|
|
printf ("{fmt}", {cast} {f}()); |
|
|
|
printf ("{fmt}", {cast} {f}()); |
|
|
|
|
|
|
|
return 0; |
|
|
|
}}'''.format(**fargs) |
|
|
|
}}'''.format(**fargs) |
|
|
|
res = self.run(code, env, extra_args=extra_args, dependencies=dependencies) |
|
|
|
res = self.run(code, env, extra_args=extra_args, dependencies=dependencies) |
|
|
|
if not res.compiled: |
|
|
|
if not res.compiled: |
|
|
@ -785,6 +788,7 @@ class CLikeCompiler: |
|
|
|
#error "No definition for __builtin_{func} found in the prefix" |
|
|
|
#error "No definition for __builtin_{func} found in the prefix" |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
#endif |
|
|
|
|
|
|
|
return 0; |
|
|
|
}}''' |
|
|
|
}}''' |
|
|
|
return self.links(t.format(**fargs), env, extra_args=extra_args, |
|
|
|
return self.links(t.format(**fargs), env, extra_args=extra_args, |
|
|
|
dependencies=dependencies) |
|
|
|
dependencies=dependencies) |
|
|
|