Add a test for Windows console application with main function in a library

Currently, this test fails for ninja/VisualC, as we don't pass
/SUBSYSTEM:CONSOLE to the linker, and it guesses wrongly that this is a GUI
app

https://lists.freedesktop.org/archives/mesa-dev/2018-June/197844.html
This commit is contained in:
Jon Turney 2018-08-11 20:39:00 +01:00 committed by Nirbheek Chauhan
parent ab1dbfe57f
commit 399f8553b7
3 changed files with 12 additions and 0 deletions

View File

@ -0,0 +1,3 @@
int main(int argc, char **argv) {
return 0;
}

View File

View File

@ -0,0 +1,9 @@
project('gui_app_test', 'c')
#
# test that linking a Windows console applications with the main function in a
# library is correctly instructed which entrypoint function to look for
#
console_lib = static_library('main', 'console_prog.c')
executable('console', 'dummy.c', link_with: console_lib, gui_app: false)