diff options
author | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-06-03 18:10:54 +0530 |
---|---|---|
committer | Nirbheek Chauhan <nirbheek@centricular.com> | 2018-06-03 19:20:32 +0530 |
commit | de85f5c689467499c104e9296dbef7f3bc2232c4 (patch) | |
tree | 0bb6bcfa3ba2ca0b47e9bde88350b1f7a8de5936 /mesonbuild/compilers/compilers.py | |
parent | 0e3eb14f32dbaf8b12dabcfd89b074732d8401b7 (diff) | |
download | meson-nirbheek/set-winepath-for-serialized-executables.tar.gz |
Add prog/lib dirs from the mingw cross-compiler to PATHnirbheek/set-winepath-for-serialized-executables
These directories contain DLLs that the executable may need, such as
libstdc++-6.dll, libwinpthread, etc.
Diffstat (limited to 'mesonbuild/compilers/compilers.py')
-rw-r--r-- | mesonbuild/compilers/compilers.py | 18 |
1 files changed, 16 insertions, 2 deletions
diff --git a/mesonbuild/compilers/compilers.py b/mesonbuild/compilers/compilers.py index c5f7df3dd..9bd9bb231 100644 --- a/mesonbuild/compilers/compilers.py +++ b/mesonbuild/compilers/compilers.py @@ -1172,13 +1172,27 @@ class ElbrusCompiler(GnuCompiler): env = os.environ.copy() env['LC_ALL'] = 'C' stdo = Popen_safe(self.exelist + ['--print-search-dirs'], env=env)[1] + paths = [] for line in stdo.split('\n'): if line.startswith('libraries:'): # lcc does not include '=' in --print-search-dirs output. libstr = line.split(' ', 1)[1] - return libstr.split(':') - return [] + paths = [os.path.realpath(p) for p in libstr.split(':')] + break + return paths + def get_program_dirs(self): + env = os.environ.copy() + env['LC_ALL'] = 'C' + stdo = Popen_safe(self.exelist + ['--print-search-dirs'], env=env)[1] + paths = [] + for line in stdo.split('\n'): + if line.startswith('programs:'): + # lcc does not include '=' in --print-search-dirs output. + libstr = line.split(' ', 1)[1] + paths = [os.path.realpath(p) for p in libstr.split(':')] + break + return paths class ClangCompiler: |