diff options
-rw-r--r-- | mesonbuild/compilers/mixins/clike.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index 56a9ea6..b088fde 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -1008,7 +1008,7 @@ class CLikeCompiler: return value[:] def find_library(self, libname, env, extra_dirs, libtype: LibType = LibType.PREFER_SHARED): - code = 'int main(void) { return 0; }' + code = 'int main(void) { return 0; }\n' return self.find_library_impl(libname, env, extra_dirs, code, libtype) def find_framework_paths(self, env): @@ -1108,7 +1108,7 @@ class CLikeCompiler: 'the compiler you are using. has_link_argument or ' 'other similar method can be used instead.' .format(arg)) - code = 'int i;\n' + code = 'extern int i;\nint i;\n' return self.has_arguments(args, env, code, mode='compile') def has_multi_link_arguments(self, args, env): @@ -1117,7 +1117,7 @@ class CLikeCompiler: # false positive. args = self.linker.fatal_warnings() + args args = self.linker_to_compiler_args(args) - code = 'int main(void) { return 0; }' + code = 'int main(void) { return 0; }\n' return self.has_arguments(args, env, code, mode='link') @staticmethod |