aboutsummaryrefslogtreecommitdiff
path: root/mesonbuild
diff options
context:
space:
mode:
authorJussi Pakkanen <jpakkane@gmail.com>2024-04-22 16:04:46 +0300
committerGitHub <noreply@github.com>2024-04-22 16:04:46 +0300
commitf233b7b98dc77937ba3448488fe7c66575c20aa6 (patch)
tree7d92fa3193e64ec61faf48e44d12a8b77ae01593 /mesonbuild
parent9e3b3db7054c7dedecd14db3e6061ff7e2227faf (diff)
parent7a60218dcaf0e11694ff1cb0531168fe576dc390 (diff)
downloadmeson-f233b7b98dc77937ba3448488fe7c66575c20aa6.zip
meson-f233b7b98dc77937ba3448488fe7c66575c20aa6.tar.gz
meson-f233b7b98dc77937ba3448488fe7c66575c20aa6.tar.bz2
Merge pull request #12808 from U2FsdGVkX1/master
Fix ninja cannot find the library when libraries contain symlinks.
Diffstat (limited to 'mesonbuild')
-rw-r--r--mesonbuild/compilers/mixins/gnu.py8
1 files changed, 4 insertions, 4 deletions
diff --git a/mesonbuild/compilers/mixins/gnu.py b/mesonbuild/compilers/mixins/gnu.py
index 9c0c3f2..79f2716 100644
--- a/mesonbuild/compilers/mixins/gnu.py
+++ b/mesonbuild/compilers/mixins/gnu.py
@@ -469,16 +469,16 @@ class GnuLikeCompiler(Compiler, metaclass=abc.ABCMeta):
# paths under /lib would be considered not a "system path",
# which is wrong and breaks things. Store everything, just to be sure.
pobj = pathlib.Path(p)
- unresolved = pobj.as_posix()
if pobj.exists():
- if unresolved not in result:
- result.append(unresolved)
try:
- resolved = pathlib.Path(p).resolve().as_posix()
+ resolved = pobj.resolve(True).as_posix()
if resolved not in result:
result.append(resolved)
except FileNotFoundError:
pass
+ unresolved = pobj.as_posix()
+ if unresolved not in result:
+ result.append(unresolved)
return result
def get_compiler_dirs(self, env: 'Environment', name: str) -> T.List[str]: