vala:meson-msvc

Last commit made on 2022-01-28
Get this branch:
git clone -b meson-msvc https://git.launchpad.net/vala

Branch merges

Branch information

Name:
meson-msvc
Repository:
lp:vala

Recent commits

a1e98b8... by Chun-wei Fan <email address hidden>

valaccompiler.vala: Check for MSVC-like compiler

If we are using an enviroment where it is set up to be like a Visual Studio
cmd.exe prompt, and if CC is not set, we assume that we are using Visual Studio

Thus, we need to call pkg-config with the --msvc-syntax flag. This also apples
if we choose to use clang-cl, so that we can use the correct C compiler/linker
flags when we compile the generated C-code.

eceda7a... by Chun-wei Fan <email address hidden>

meson: Symlink to valacodegen.dll in bindir

This is so that valac builds on Windows can find valacodegen.dll when we
are doing shared builds.

734b60d... by Chun-wei Fan <email address hidden>

meson: Make tests run better on MSVC builds

Use compiler flags that would work on Visual Studio so that tests can
run much better than without. Currently, one may need to set the
PKG_CONFIG envvar to `<pkg-config-executable> --msvc-syntax` for this to
work best.

7bd1b65... by Chun-wei Fan <email address hidden>

meson: Port install scripts for cmd.exe shells

On Windows builds using Visual Studio-like compilers, we are using
cmd.exe shells, so we do the symlinking of the tools and man pages using
the commands that Windows provides.

Also, group the various programs and man pages together so that we have
single commands for each of the subdirs that we want to run the install
scripts, to make things simpler.

806a0be... by Chun-wei Fan <email address hidden>

ccode, compiler: Include compat headers for MSVC

The generated code include unistd.h and utime.h, so include the compat
headers in $(srcroot)/msvc to cover for those.

8d8b2bd... by Chun-wei Fan <email address hidden>

gobject-introspection: Don't include unistd.h on MSVC

Visual Studio does not come with this header, so don't try to include it
in C code when building for Visual Studio.

89f72af... by Chun-wei Fan <email address hidden>

build: Add Visual Studio compat headers

Visual Studio does not come with unistd.h and utime.h, so building items
that originate from glib-2.0.vapi et al will fail if items that depend
on these headers are used.

Do overcome this, add compat headers for them that will include the
appropriate headers from Visual Studio (or the Windows SDK), to fix the
build.

a7a533c... by Chun-wei Fan <email address hidden>

vala/meson.build: Use Python to generate libvala-0.xx.vapi

This way, we do not need to depend on the 'cat' utility program which is
not readily available on Windows unless one is using MSYS2 or Cygwin.

b90c302... by Chun-wei Fan <email address hidden>

meson.build: Don't use GCC-specific CFlags on MSVC

They cause more trouble than help on Visual Studio builds. Instead, use
msvc_recommended_pragmas.h which is included with GLib that should cover
at least most of the items covered by those CFlags.

eb664f5... by Chun-wei Fan <email address hidden>

meson: Look for win_[flex|bison] too

People might have installed win_flex and/or win_bison, which work better
for native Windows builds.