build.run: in BuildPlan.execute_local, always use LF line endings.
This way the files are written identically on *nix and Windows. Fixes #732.
This commit is contained in:
parent
a704b1b218
commit
dafefa87a9
|
@ -84,8 +84,9 @@ class BuildPlan:
|
||||||
if dirname:
|
if dirname:
|
||||||
os.makedirs(dirname, exist_ok=True)
|
os.makedirs(dirname, exist_ok=True)
|
||||||
|
|
||||||
mode = "wt" if isinstance(content, str) else "wb"
|
if isinstance(content, str):
|
||||||
with open(filename, mode) as f:
|
content = content.encode("utf-8")
|
||||||
|
with open(filename, "wb") as f:
|
||||||
f.write(content)
|
f.write(content)
|
||||||
|
|
||||||
if run_script:
|
if run_script:
|
||||||
|
|
|
@ -43,6 +43,7 @@ Toolchain changes
|
||||||
|
|
||||||
.. currentmodule:: amaranth
|
.. currentmodule:: amaranth
|
||||||
|
|
||||||
|
* Changed: text files are written with LF line endings on Windows, like on other platforms.
|
||||||
* Added: ``debug_verilog`` override in :class:`build.TemplatedPlatform`.
|
* Added: ``debug_verilog`` override in :class:`build.TemplatedPlatform`.
|
||||||
* Deprecated: use of mixed-case toolchain environment variable names, such as ``NMIGEN_ENV_Diamond`` or ``AMARANTH_ENV_Diamond``; use upper-case environment variable names, such as ``AMARANTH_ENV_DIAMOND``.
|
* Deprecated: use of mixed-case toolchain environment variable names, such as ``NMIGEN_ENV_Diamond`` or ``AMARANTH_ENV_Diamond``; use upper-case environment variable names, such as ``AMARANTH_ENV_DIAMOND``.
|
||||||
* Removed: (deprecated in 0.3) :meth:`sim.Simulator.step`.
|
* Removed: (deprecated in 0.3) :meth:`sim.Simulator.step`.
|
||||||
|
|
Loading…
Reference in a new issue