mirror of
https://github.com/enjoy-digital/litex.git
synced 2025-01-04 09:52:26 -05:00
replace /mnt/c/ to C:/ for WSL and detecting letter drive
This commit is contained in:
parent
05d7471f6c
commit
b8f6c4aa8d
1 changed files with 4 additions and 0 deletions
|
@ -149,6 +149,10 @@ class GowinToolchain(GenericToolchain):
|
||||||
# Support windows/powershell
|
# Support windows/powershell
|
||||||
if sys.platform == "win32":
|
if sys.platform == "win32":
|
||||||
f = f.replace("\\", "\\\\")
|
f = f.replace("\\", "\\\\")
|
||||||
|
# replace /mnt/c/ to C:/ for WSL and detecting letter drive
|
||||||
|
elif "linux" in sys.platform and "WSL" in os.uname().release and f.startswith("/mnt/") and len(f) > 6:
|
||||||
|
f = f"{f[5].upper()}:\\\\" + f[7:]
|
||||||
|
f = f.replace("/", "\\\\")
|
||||||
tcl.append(f"add_file {f}")
|
tcl.append(f"add_file {f}")
|
||||||
|
|
||||||
# Set Options.
|
# Set Options.
|
||||||
|
|
Loading…
Reference in a new issue