Skip to content

Commit

Permalink
MinGW: link as terminal server aware
Browse files Browse the repository at this point in the history
Whith Windows 2000, Microsoft introduced a flag to the PE header to mark executables as
"terminal server aware". Windows terminal servers provide a redirected Windows directory and
redirected registry hives when launching legacy applications without this flag set. Since we
do not use any INI files in the Windows directory and don't write to the registry, we don't
need  this additional preparation. Telling the OS that we don't need this should provide
slightly improved startup times in terminal server environments.

When building for supported Windows Versions with MSVC the /TSAWARE linker flag is
automatically set, but MinGW requires us to set the --tsaware flag manually.

This partially addresses #3935.

Signed-off-by: Matthias Aßhauer <mha1993@live.de>
  • Loading branch information
rimrul authored and dscho committed Sep 18, 2024
1 parent f8b122e commit be6056f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion config.mak.uname
Original file line number Diff line number Diff line change
Expand Up @@ -690,7 +690,7 @@ ifeq ($(uname_S),MINGW)
DEFAULT_HELP_FORMAT = html
HAVE_PLATFORM_PROCINFO = YesPlease
CSPRNG_METHOD = rtlgenrandom
BASIC_LDFLAGS += -municode
BASIC_LDFLAGS += -municode -Wl,--tsaware
COMPAT_CFLAGS += -DNOGDI -Icompat -Icompat/win32
COMPAT_CFLAGS += -DSTRIP_EXTENSION=\".exe\"
COMPAT_OBJS += compat/mingw.o compat/winansi.o \
Expand Down

0 comments on commit be6056f

Please sign in to comment.