diff options
author | Christopher Degawa <ccom@randomderp.com> | 2020-09-10 17:56:26 +0000 |
---|---|---|
committer | Jan Ekström <jeebjp@gmail.com> | 2020-10-15 01:28:30 +0300 |
commit | cfead22b803e67bbd9d8ac09d61a56148938d46b (patch) | |
tree | 8c9b6dffe35c45a2d963b28a9e3313eef254f002 /wscript_build.py | |
parent | 2cfeee68d4b8dc323cc4c173ff0b1fba18619adb (diff) | |
download | mpv-cfead22b803e67bbd9d8ac09d61a56148938d46b.tar.bz2 mpv-cfead22b803e67bbd9d8ac09d61a56148938d46b.tar.xz |
wscript_build.py: use -Wl,--subsystem,console instead
Fixes an issue with clang not using the -mconsole option if mwindows
is present resulting in mpv.com being a gui program instead of a
console program.
Does not interfere with gcc compilation.
result without this patch
```
file .\mpv.com .\mpv.exe
.\mpv.com: PE32+ executable (GUI) x86-64 (stripped to external PDB)
.\mpv.exe: PE32+ executable (GUI) x86-64 (stripped to external PDB)
```
both executables open the mpv gui with out console output.
result with this patch
```
file .\mpv.com .\mpv.exe
.\mpv.com: PE32+ executable (console) x86-64 (stripped to external PDB)
.\mpv.exe: PE32+ executable (GUI) x86-64 (stripped to external PDB)
```
mpv.com properly outputs text to console instead of instantly opening
a gui
`, for MS Windows` removed from the end of file outputs to reduce col
count
https://github.com/m-ab-s/media-autobuild_suite/issues/1794
Signed-off-by: Christopher Degawa <ccom@randomderp.com>
Diffstat (limited to 'wscript_build.py')
-rw-r--r-- | wscript_build.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/wscript_build.py b/wscript_build.py index e8428fa9dc..4de6bdbf27 100644 --- a/wscript_build.py +++ b/wscript_build.py @@ -628,7 +628,7 @@ def build(ctx): ) wrapctx.env.cprogram_PATTERN = "%s.com" - wrapflags = ['-municode', '-mconsole'] + wrapflags = ['-municode', '-Wl,--subsystem,console'] wrapctx.env.CFLAGS = ctx.env.CFLAGS + wrapflags wrapctx.env.LAST_LINKFLAGS = ctx.env.LAST_LINKFLAGS + wrapflags |