aboutsummaryrefslogtreecommitdiff
path: root/BOOTSTRAP-WINDOWS-MSVC.cli
diff options
context:
space:
mode:
Diffstat (limited to 'BOOTSTRAP-WINDOWS-MSVC.cli')
-rw-r--r--BOOTSTRAP-WINDOWS-MSVC.cli91
1 files changed, 78 insertions, 13 deletions
diff --git a/BOOTSTRAP-WINDOWS-MSVC.cli b/BOOTSTRAP-WINDOWS-MSVC.cli
index b162ad9..49a84c0 100644
--- a/BOOTSTRAP-WINDOWS-MSVC.cli
+++ b/BOOTSTRAP-WINDOWS-MSVC.cli
@@ -38,7 +38,7 @@ versions. It can also be used to uninstall the toolchain:
\
> cd build2-toolchain-X.Y
-> bpkg uninstall build2 bpkg bdep
+> bpkg uninstall --all
\
\N|Note that in both cases (manual or scripted bootstrap), if something goes
@@ -59,7 +59,7 @@ file for details.
\
> cd build2
-> .\bootstrap-msvc.bat cl
+> .\bootstrap-msvc.bat cl /w /MP8
> build2\b-boot --version
\
@@ -95,7 +95,7 @@ libraries and then staged:
config.install.root=C:\build2 ^
config.install.data_root=root\stage
-> build2\build2\b-boot install: build2/ bpkg/
+> build2\build2\b-boot install: build2\ bpkg\
\
The strange-looking \c{config.install.data_root=root\\stage} means install
@@ -121,27 +121,46 @@ C:\build2\bin\bpkg-stage.exe
At the next step we will use \c{bpkg} to build and install the entire
toolchain. If for some reason you prefer not to build from packages (for
example, because the machine is offline), then you can convert this step into
-a local installation and skip the rest. For this you will need to change
-the \c{configure} and \c{install} command lines above along these lines (see
-also a note on the following step about only building shared libraries):
+a local installation and skip the rest of the steps.
+
+\N|To perform a local installation with the \c{build-msvc.bat} batch file,
+pass the \c{--local} option.|
+
+To perform a local installation you will need to change the \c{configure} and
+\c{install} command lines above along these lines (see also a note on the
+following step about only building shared libraries, toolchain executables
+prefix/suffix, etc):
\
> build2\build2\b-boot configure ^
+ config.config.hermetic=true ^
config.cxx=cl ^
config.cc.coptions=/O2 ^
config.bin.lib=shared ^
config.install.root=C:\build2
-> build2\build2\b-boot install: build2/ bpkg/ bdep/
+> build2\build2\b-boot install: build2\ bpkg\ bdep\
\
-\N|To perform a local installation with the \c{build-msvc.bat} batch file,
-pass the \c{--local} option.|
+You will also need to build and install the standard build system modules:
+
+\
+> b install: !config.install.scope=project libbuild2-*\
+\
+
+\N|To verify the build system modules installation you can load them with the
+following command:
+
+\
+> b noop: tests\libbuild2-*\
+\
+
+|
To uninstall such a local installation, run:
\
-> b uninstall: build2/ bpkg/ bdep/
+> b uninstall: build2\ bpkg\ bdep\ libbuild2-*\
\
|
@@ -160,6 +179,7 @@ previous step and you may want/need to make similar adjustments.
> bpkg-stage create ^
cc ^
+ config.config.hermetic=true ^
config.cxx=cl ^
config.cc.coptions=/O2 ^
config.bin.lib=shared ^
@@ -169,16 +189,36 @@ previous step and you may want/need to make similar adjustments.
\N|The above configuration will only build shared libraries. If you would like
to build both shared and static, remove \c{config.bin.lib=shared}.|
+\N|To add a custom prefix/suffix to the toolchain executables names, add
+\c{config.bin.exe.prefix=...} and/or \c{config.bin.exe.suffix=...}.|
+
+\N|The \c{config.config.hermetic=true} configuration variable in the above
+command makes sure the embedded \c{~host} and \c{~build2} configurations
+include the current environment. This is especially important for \c{~build2}
+which is used to dynamically build and load ad hoc recipes and build system
+modules and must therefore match the environment that was used to build the
+build system itself.|
+
Next, we add the package repository, build, and install:
\
> bpkg-stage add https://pkg.cppget.org/1/alpha
> bpkg-stage fetch
> bpkg-stage build --for install build2 bpkg bdep
-> bpkg-stage install build2 bpkg bdep
+> bpkg-stage install --all
\
-Finally, we verify the result:
+\N|By default \c{bpkg} will build the latest available version of each
+package. You can, however, specify the desired versions explicitly, for
+example:
+
+\
+> bpkg-stage build --for install build2/X.Y.Z bpkg/X.Y.Z bdep/X.Y.Z
+\
+
+|
+
+To verify the result, run:
\
> where b
@@ -195,15 +235,40 @@ C:\build2\bin\bdep.exe
> bdep --version
\
+Finally, we build and install the standard build system modules:
+
+\
+> bpkg build --for install libbuild2-autoconf libbuild2-kconfig
+> bpkg install !config.install.scope=project ^
+ --all-pattern=libbuild2-*
+\
+
+\N|To get a list of the standard pre-installed build system modules in a
+specific version of the toolchain, run:
+
+\
+> cd ..\build2-toolchain-X.Y.Z
+> dir /B libbuild2-*
+\
+
|
+\N|To verify the build system modules installation you can load them with the
+following command:
+
+\
+> b noop: ..\build2-toolchain-X.Y.Z\tests\libbuild2-*\
+\
+
+||
+
\li|\n\b{5. Clean}\n
The last thing we need to do is uninstall the staged tools:
\
> cd ..\build2-toolchain-X.Y.Z # Back to bootstrap.
-> b uninstall: build2/ bpkg/
+> b uninstall: build2\ bpkg\
\
||