diff options
author | Samuel Longchamps <memophysic@gmail.com> | 2020-12-25 13:34:49 -0800 |
---|---|---|
committer | Jussi Pakkanen <jpakkane@gmail.com> | 2020-12-28 22:14:48 +0000 |
commit | 12cfd10e6a3638195b4c69c1b251327e338964cb (patch) | |
tree | d14871ab2103e1aec19628bffa0519a23ccc4eb2 /mesonbuild/backend | |
parent | e11218c153f1625a7a95e5e56b202c8cb850c22e (diff) | |
download | meson-12cfd10e6a3638195b4c69c1b251327e338964cb.zip meson-12cfd10e6a3638195b4c69c1b251327e338964cb.tar.gz meson-12cfd10e6a3638195b4c69c1b251327e338964cb.tar.bz2 |
Fix network path output in ninja backend on Windows
Diffstat (limited to 'mesonbuild/backend')
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 40d4ae3..b9be80f 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -374,6 +374,13 @@ class NinjaBuildElement: # do not require quoting, unless explicitly specified, which is necessary for # the csc compiler. line = line.replace('\\', '/') + if mesonlib.is_windows(): + # Support network paths as backslash, otherwise they are interpreted as + # arguments for compile/link commands when using MSVC + line = ' '.join( + (l.replace('//', '\\\\', 1) if l.startswith('//') else l) + for l in line.split(' ') + ) outfile.write(line) if use_rspfile: |