From 07818dac6acc7a805548be4b605320dd27de126c Mon Sep 17 00:00:00 2001 From: Nirbheek Chauhan Date: Tue, 12 Mar 2019 17:56:44 +0530 Subject: compilers: Try harder to dedup builtin libs Compiler internal libs should always be de-duplicated, no matter what. Closes https://github.com/mesonbuild/meson/issues/2150 Test case is by Bruce Richardson in the issue. --- mesonbuild/compilers/c.py | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) (limited to 'mesonbuild/compilers/c.py') diff --git a/mesonbuild/compilers/c.py b/mesonbuild/compilers/c.py index d4626d6..d4d6f66 100644 --- a/mesonbuild/compilers/c.py +++ b/mesonbuild/compilers/c.py @@ -35,6 +35,7 @@ from .compilers import ( get_largefile_args, gnu_winlibs, msvc_winlibs, + unixy_compiler_internal_libs, vs32_instruction_set_args, vs64_instruction_set_args, ArmCompiler, @@ -52,8 +53,6 @@ from .compilers import ( CcrxCompiler, ) -gnu_compiler_internal_libs = ('m', 'c', 'pthread', 'dl', 'rt') - class CCompiler(Compiler): # TODO: Replace this manual cache with functools.lru_cache @@ -61,7 +60,7 @@ class CCompiler(Compiler): program_dirs_cache = {} find_library_cache = {} find_framework_cache = {} - internal_libs = gnu_compiler_internal_libs + internal_libs = unixy_compiler_internal_libs @staticmethod def attribute_check_func(name): @@ -1375,7 +1374,7 @@ class IntelCCompiler(IntelCompiler, CCompiler): class VisualStudioCCompiler(CCompiler): std_warn_args = ['/W3'] std_opt_args = ['/O2'] - ignore_libs = gnu_compiler_internal_libs + ignore_libs = unixy_compiler_internal_libs internal_libs = () crt_args = {'none': [], -- cgit v1.1