diff options
-rw-r--r-- | mesonbuild/backend/ninjabackend.py | 3 | ||||
-rw-r--r-- | mesonbuild/compilers.py | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/mesonbuild/backend/ninjabackend.py b/mesonbuild/backend/ninjabackend.py index 4885f4b..0e8e862 100644 --- a/mesonbuild/backend/ninjabackend.py +++ b/mesonbuild/backend/ninjabackend.py @@ -2170,6 +2170,9 @@ rule FORTRAN_DEP_HACK if isinstance(target, build.Executable): # Currently only used with the Swift compiler to add '-emit-executable' commands += linker.get_std_exe_link_args() + # If gui_app, and that's significant on this platform + if target.gui_app and hasattr(linker, 'get_gui_app_args'): + commands += linker.get_gui_app_args() elif isinstance(target, build.SharedLibrary): if isinstance(target, build.SharedModule): commands += linker.get_std_shared_module_link_args() diff --git a/mesonbuild/compilers.py b/mesonbuild/compilers.py index 199bbab..fa06ae9 100644 --- a/mesonbuild/compilers.py +++ b/mesonbuild/compilers.py @@ -2461,6 +2461,10 @@ class GnuCompiler: # For other targets, discard the .def file. return [] + def get_gui_app_args(self): + if self.gcc_type in (GCC_CYGWIN, GCC_MINGW): + return ['-mwindows'] + return [] class GnuCCompiler(GnuCompiler, CCompiler): def __init__(self, exelist, version, gcc_type, is_cross, exe_wrapper=None, defines=None): |