[build2] Visual Studio support

Boris Kolpackov boris at codesynthesis.com
Mon Feb 29 15:44:44 UTC 2016


Hi Joël,

Klaim - Joël Lamotte <mjklaim at gmail.com> writes:

> What is missing to get build2 (including bpkg, brep etc) working
> on windows and with visual studio compiler (assuming support of
> only the last version of it, which have a compiler-only installable
> package available).
> 
> What problems need to be solved?

This can be broken down into two, well, actually three parts:

1. Add support for the VC++ compiler. Most of it should be straightforward
   except, perhaps, the header dependency extraction part (equivalent to
   the -M* functionality in GCC/Clang). We will probably first do this from
   Linux as a cross-compiler since we can run cl.exe under Wine.

2. Build the toolchain for Win32 using a C++ compiler with a reasonably
   complete support for C++11/14 (GCC on MinGW). While this should be
   mostly straightforward, there are a couple of platform-specific areas
   (like process management) that will require work.

3. Build the toolchain with VC++.

#1 and #2 above can be done independently and in any order while #3
requires #1.

We don't want to rush into #1 because we want to work out the C++
compilation logic using a single compiler interface (GCC/Clang). As
soon as we also support VC++, we will have to make changes in two
places.

But we are going get into it sooner rather than later.


> Also there is no obvious list of things that are being worked on right
> now and some kind of list of tasks that will be attacked soon (a roadmap
> basically). Could you provide one?

The list exists, it's just not public (since nobody asked for it until
now ;-)). In the build system we are currently working on what we call
"high fidelity builds", i.e., detecting when things like compiler,
options, etc., change and updating affected targets. There are also
various minor improvements in bpkg and brep. Once this is done (probably
in a week or so), we plan to release the next alpha version.

You can also track the development in the git repo:

https://git.build2.org/cgit/

As for a more general roadmap, here are the major items for the foreseeable
future (as you can see, Windows/VC++ are at the top of the list):

- Windows support

- VC++ support

- C compiler support

- Parallel builds

- Config initializer (ability to say 'config=gcc,release' instead of
  'config.cxx=gcc config.cxx.coptions=-O3').

- Library versioning

- Dynamic module building/loading

- C++ code fragments in buildfiles

Boris



More information about the users mailing list