diff options
-rw-r--r-- | mesonbuild/compilers/mixins/clike.py | 4 | ||||
-rw-r--r-- | mesonbuild/linkers.py | 4 |
2 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/compilers/mixins/clike.py b/mesonbuild/compilers/mixins/clike.py index dfa3f8a..b2942d3 100644 --- a/mesonbuild/compilers/mixins/clike.py +++ b/mesonbuild/compilers/mixins/clike.py @@ -32,7 +32,7 @@ from pathlib import Path from ... import arglist from ... import mesonlib from ... import mlog -from ...linkers import GnuLikeDynamicLinkerMixin, SolarisDynamicLinker +from ...linkers import GnuLikeDynamicLinkerMixin, SolarisDynamicLinker, CompCertDynamicLinker from ...mesonlib import LibType from .. import compilers from .visualstudio import VisualStudioLikeCompiler @@ -67,7 +67,7 @@ class CLikeCompilerArgs(arglist.CompilerArgs): # This covers all ld.bfd, ld.gold, ld.gold, and xild on Linux, which # all act like (or are) gnu ld # TODO: this could probably be added to the DynamicLinker instead - if isinstance(self.compiler.linker, (GnuLikeDynamicLinkerMixin, SolarisDynamicLinker)): + if isinstance(self.compiler.linker, (GnuLikeDynamicLinkerMixin, SolarisDynamicLinker, CompCertDynamicLinker)): group_start = -1 group_end = -1 for i, each in enumerate(new): diff --git a/mesonbuild/linkers.py b/mesonbuild/linkers.py index 02b30e9..d85c88e 100644 --- a/mesonbuild/linkers.py +++ b/mesonbuild/linkers.py @@ -900,13 +900,13 @@ class CompCertDynamicLinker(DynamicLinker): def get_link_whole_for(self, args: T.List[str]) -> T.List[str]: if not args: return args - return self._apply_prefix('-WUl,--start-group') + args + self._apply_prefix('-WUl,--end-group') + return self._apply_prefix('-Wl,--whole-archive') + args + self._apply_prefix('-Wl,--no-whole-archive') def get_accepts_rsp(self) -> bool: return False def get_lib_prefix(self) -> str: - return '-l' + return '' def get_std_shared_lib_args(self) -> T.List[str]: return [] |