You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Most of the code in this file is used only for testing and is not part
of emscripten proper, so move that code into `test/line_endings.py`.
Move the remaining utility functions to `tools/utils.py`.
Update `write_file` utility so it can write a file with the correct
line endings. This simplifies the callers who want to write a file
with specific line endings.
Copy file name to clipboardExpand all lines: site/source/docs/tools_reference/emcc.rst
+2-2Lines changed: 2 additions & 2 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -566,9 +566,9 @@ Options that are modified or new in *emcc* are listed below:
566
566
[compile]
567
567
Tells *emcc* to emit an object file which can then be linked with other object files to produce an executable.
568
568
569
-
``--output_eol windows|linux``
569
+
``--output-eol windows|linux``
570
570
[link]
571
-
Specifies the line ending to generate for the text files that are outputted. If "--output_eol windows" is passed, the final output files will have Windows \r\n line endings in them. With "--output_eol linux", the final generated files will be written with Unix \n line endings.
571
+
Specifies the line ending to generate for the text files that are outputted. If "--output-eol windows" is passed, the final output files will have Windows ``\r\n`` line endings in them. With "--output-eol linux", the final generated files will be written with Unix ``\n`` line endings.
print('File \''+filename+'\' contains OLD macOS line endings "\\r"', file=sys.stderr)
78
-
print("Content around an OLD macOS line ending location: '"+old_macos_line_ending_example+"'", file=sys.stderr)
62
+
print("Content around an OLD macOS line ending location: '"+old_macos_line_ending_example.decode('utf-8')+"'", file=sys.stderr)
79
63
# We don't want to use the old macOS (9.x) line endings anywhere.
80
64
return1
81
65
82
66
ifhas_dos_line_endingsandhas_unix_line_endings:
83
67
ifprint_errors:
84
68
print('File \''+filename+'\' contains both DOS "\\r\\n" and UNIX "\\n" line endings! ('+str(dos_line_ending_count) +' DOS line endings, '+str(unix_line_ending_count) +' UNIX line endings)', file=sys.stderr)
85
-
print("Content around a DOS line ending location: '"+dos_line_ending_example+"'", file=sys.stderr)
86
-
print("Content around an UNIX line ending location: '"+unix_line_ending_example+"'", file=sys.stderr)
69
+
print("Content around a DOS line ending location: '"+dos_line_ending_example.decode('utf-8')+"'", file=sys.stderr)
70
+
print("Content around an UNIX line ending location: '"+unix_line_ending_example.decode('utf-8')+"'", file=sys.stderr)
print('File \''+filename+'\' contains DOS "\\r\\n" line endings! ('+str(dos_line_ending_count) +' DOS line endings), but expected only UNIX line endings!', file=sys.stderr)
99
-
print("Content around a DOS line ending location: '"+dos_line_ending_example+"'", file=sys.stderr)
83
+
print("Content around a DOS line ending location: '"+dos_line_ending_example.decode('utf-8')+"'", file=sys.stderr)
100
84
return1# DOS line endings, but expected UNIX
101
85
102
86
ifexpect_only=='\r\n'andhas_unix_line_endings:
103
87
ifprint_errors:
104
88
print('File \''+filename+'\' contains UNIX "\\n" line endings! ('+str(unix_line_ending_count) +' UNIX line endings), but expected only DOS line endings!', file=sys.stderr)
105
-
print("Content around a UNIX line ending location: '"+unix_line_ending_example+"'", file=sys.stderr)
89
+
print("Content around a UNIX line ending location: '"+unix_line_ending_example.decode('utf-8')+"'", file=sys.stderr)
0 commit comments