aboutsummaryrefslogtreecommitdiff
path: root/BOOTSTRAP-WINDOWS-CLANG.cli
diff options
context:
space:
mode:
Diffstat (limited to 'BOOTSTRAP-WINDOWS-CLANG.cli')
-rw-r--r--BOOTSTRAP-WINDOWS-CLANG.cli44
1 files changed, 28 insertions, 16 deletions
diff --git a/BOOTSTRAP-WINDOWS-CLANG.cli b/BOOTSTRAP-WINDOWS-CLANG.cli
index 694fa91..3429c5a 100644
--- a/BOOTSTRAP-WINDOWS-CLANG.cli
+++ b/BOOTSTRAP-WINDOWS-CLANG.cli
@@ -69,7 +69,7 @@ compile options; run \c{bootstrap-clang.bat /?} and see the
\
> cd build2
-> .\bootstrap-clang.bat clang++
+> .\bootstrap-clang.bat clang++ -m64 -w
> build2\b-boot --version
\
@@ -79,7 +79,7 @@ in parallel:
\
> cd build2
-> mingw32-make -f bootstrap.gmake -j 8 CXX=clang++
+> mingw32-make -f bootstrap.gmake -j 8 CXX=clang++ \"CXXFLAGS=-m64 -w\"
> build2\b-boot --version
\
@@ -92,10 +92,9 @@ Then, we rebuild the build system with the result of Phase 1 linking libraries
statically.
\
-> build2\b-boot ^
- config.cxx=clang++ ^
- config.cc.coptions=-m64 ^
- config.bin.lib=static ^
+> build2\b-boot ^
+ \"config.cxx=clang++ -m64\" ^
+ config.bin.lib=static ^
build2\exe{b}
> move /y build2\b.exe build2\b-boot.exe
@@ -114,8 +113,7 @@ libraries and then staged:
> cd .. # Back to build2-toolchain-X.Y.Z\
> build2\build2\b-boot configure ^
- config.cxx=clang++ ^
- config.cc.coptions=-m64 ^
+ \"config.cxx=clang++ -m64\" ^
config.bin.lib=shared ^
config.bin.suffix=-stage ^
config.install.root=C:\build2 ^
@@ -154,12 +152,14 @@ 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):
+following step about only building shared libraries, toolchain executables
+prefix/suffix, etc):
\
> build2\build2\b-boot configure ^
- config.cxx=clang++ ^
- \"config.cc.coptions=-m64 -O2\" ^
+ config.config.hermetic=true ^
+ \"config.cxx=clang++ -m64\" ^
+ config.cc.coptions=-O2 ^
config.bin.lib=shared ^
config.install.root=C:\build2
@@ -169,7 +169,7 @@ following step about only building shared libraries):
You will also need to build and install the standard build system modules:
\
-> b install: libbuild2-*\
+> b install: !config.install.scope=project libbuild2-*\
\
\N|To verify the build system modules installation you can load them with the
@@ -203,8 +203,9 @@ previous step and you may want/need to make similar adjustments.
> bpkg-stage create ^
cc ^
- config.cxx=clang++ ^
- \"config.cc.coptions=-m64 -O2\" ^
+ config.config.hermetic=true ^
+ \"config.cxx=clang++ -m64\" ^
+ config.cc.coptions=-O2 ^
config.bin.lib=shared ^
config.install.root=C:\build2
\
@@ -212,6 +213,16 @@ 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:
\
@@ -251,8 +262,9 @@ C:\build2\bin\bdep.exe
Finally, we build and install the standard build system modules:
\
-> bpkg build --for install libbuild2-kconfig
-> bpkg install --all-pattern=libbuild2-*
+> 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