summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xbootstrap43
1 files changed, 34 insertions, 9 deletions
diff --git a/bootstrap b/bootstrap
index dbc1d7f..7a1291b 100755
--- a/bootstrap
+++ b/bootstrap
@@ -13,15 +13,16 @@
# This script assumes the following steps have been performed:
#
# 1. The latest staged toolchain has been temporarily installed somewhere
-# other than /usr/local (e.g., /tmp/build2) and is in PATH.
+# other than /usr/local (e.g., /tmp/build2) and is in PATH. Hint: use
+# --local to speed things up seeing that this is a throw-away installation.
#
# 2. The CLI and ODB compilers have been built and are either installed (if
# you don't plan to contribute to them) or symlinked in /usr/local/bin/.
# For the latter case they would typically go to ~/work/{cli,odb/}, for
-# example (showing for CLI; note: remove sanitizers for ODB):
+# example, for CLI:
#
-# NOTE: clone using the git.codesynthesis.com:/var/scm/cli/cli.git SSH
-# URL for rw access.
+# NOTE: clone using the git.codesynthesis.com:/var/scm/... SSH URL for rw
+# access.
#
# mkdir -p ~/work/cli
# cd ~/work/cli
@@ -31,20 +32,36 @@
# config.cxx=g++-N \
# config.cc.coptions="-Wall -Wextra -Werror -g3 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer"
# b
-# sudo ln -s "$(pwd)/cli/cli /usr/local/bin/cli"
+# sudo ln -s "$(pwd)/cli/cli" /usr/local/bin/cli
# which cli
# cli --version
#
+# For ODB (no sanitizer use is currently possible due to the way GCC is
+# built):
+#
+# mkdir -p ~/work/odb
+# cd ~/work/odb
+# git clone --recursive https://git.codesynthesis.com/odb/odb.git
+# cd odb
+# bdep init -C ../builds/gccN-asan @gccN-asan cc \
+# config.cxx=g++-N \
+# config.cc.coptions="-Wall -Wextra -Werror -g3"
+# b
+# sudo ln -s "$(pwd)/odb/odb" /usr/local/bin/odb
+# sudo ln -s "$(pwd)/odb/odb.so" /usr/local/bin/odb.so
+# which odb
+# odb --version
+#
# Once this is done, you should be able to:
#
+# NOTE: clone using the git.build2.org:/var/scm/... SSH URL and pass the
+# --ssh bootstrap option for rw access.
+#
# mkdir -p ~/work/build2
# cd ~/work/build2
# git clone --recursive https://git.build2.org/etc.git
# PATH="/tmp/build2/bin:$PATH" etc/bootstrap
#
-# NOTE: use the git.build2.org:/var/scm/etc.git SSH URL and pass the
-# --ssh bootstrap option for rw access.
-#
# After a successful bootstrap you can remove the staged toolchain.
#
# Also a few notes and tips on the development process: Because the toolchain
@@ -215,10 +232,17 @@ run mkdir -p builds
# Build system configuration.
#
-run bpkg create -d "builds/$cfg-asan-bs" cc cli \
+# Notes:
+#
+# 1. Using ?cli since this should be buildable by b-boot.
+#
+# 2. Only building shared libraries for speed of development.
+#
+run bpkg create -d "builds/$cfg-asan-bs" cc ?cli \
config.cxx="$cxx" \
config.cc.coptions="-Wall -Wextra -Werror -g3 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" \
config.cc.loptions="-fuse-ld=gold -Wl,--threads,--thread-count,4" \
+ config.bin.lib=shared \
config.install.root=/tmp/install config.dist.root=/tmp/dist
run bdep init -d libbutl -A "builds/$cfg-asan-bs" "@$cfg-asan-bs" --no-default
@@ -233,6 +257,7 @@ run bpkg create -d "builds/$cfg-asan-pm" cc cli \
config.cxx="$cxx" \
config.cc.coptions="-Wall -Wextra -Werror -g3 -fsanitize=address -fsanitize=undefined -fno-omit-frame-pointer" \
config.cc.loptions="-fuse-ld=gold -Wl,--threads,--thread-count,4" \
+ config.bin.lib=shared \
config.install.root=/tmp/install config.dist.root=/tmp/dist
run bdep init -d libbutl -A "builds/$cfg-asan-pm" "@$cfg-asan-pm" --default