diff options
author | Jussi Pakkanen <jpakkane@gmail.com> | 2021-10-01 18:16:53 +0300 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2021-10-01 18:38:37 +0300 |
commit | 78cece0407e2b7093df6446374e6f6ea59b74e9c (patch) | |
tree | d5d82e43e5176c35ce44e9e6b962c4474adb488d | |
parent | bd2fcb268b9ff48797bebb6a2ef94d2741234191 (diff) | |
download | meson-linkmsg.zip meson-linkmsg.tar.gz meson-linkmsg.tar.bz2 |
Improve linker detection failure error message.linkmsg
-rw-r--r-- | mesonbuild/linkers/detect.py | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/mesonbuild/linkers/detect.py b/mesonbuild/linkers/detect.py index 702bf3d..b85acc6 100644 --- a/mesonbuild/linkers/detect.py +++ b/mesonbuild/linkers/detect.py @@ -115,10 +115,12 @@ def guess_win_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Ty prefix=comp_class.LINKER_PREFIX if use_linker_prefix else [], version=search_version(out), direct=invoked_directly) elif 'GNU coreutils' in o: + import shutil + fullpath = shutil.which(compiler[0]) raise EnvironmentException( - "Found GNU link.exe instead of MSVC link.exe. This link.exe " - "is not a linker. You may need to reorder entries to your " - "%PATH% variable to resolve this.") + f"Found GNU link.exe instead of MSVC link.exe in {fullpath}\.n" + "This link.exe is not a linker.\n" + "You may need to reorder entries to your %PATH% variable to resolve this.") __failed_to_detect_linker(compiler, check_args, o, e) def guess_nix_linker(env: 'Environment', compiler: T.List[str], comp_class: T.Type['Compiler'], |