summaryrefslogtreecommitdiff
path: root/bootstrap.sh
diff options
context:
space:
mode:
authorBent Bisballe Nyeng <deva@aasimon.org>2022-12-15 11:05:31 +0100
committerBent Bisballe Nyeng <deva@aasimon.org>2023-01-09 17:22:54 +0100
commit55ab1f564286c6f3e986bf68ebb271132a749c6f (patch)
treebf6b35923b3a2e85cb061c78ea929ff58933c720 /bootstrap.sh
parentde26eed5157a1b5efc2a72668b4f4a22638f2774 (diff)
Add clang support.
Diffstat (limited to 'bootstrap.sh')
-rwxr-xr-xbootstrap.sh7
1 files changed, 5 insertions, 2 deletions
diff --git a/bootstrap.sh b/bootstrap.sh
index a5c11ac..5873e83 100755
--- a/bootstrap.sh
+++ b/bootstrap.sh
@@ -1,7 +1,10 @@
#!/bin/sh
+: ${CXX:=g++}
+CXX=$(which $CXX)
+
echo "Bootstrapping..."
-g++ -std=c++20 -Wall -O3 -Isrc -pthread src/bootstrap.cc ctor.cc test/ctor.cc -o ctor && \
+$CXX -std=c++20 -Wall -O3 -Isrc -pthread src/bootstrap.cc ctor.cc test/ctor.cc -o ctor && \
./ctor && \
-g++ -std=c++20 -Wall -O3 -Isrc -pthread ctor.cc test/ctor.cc -Lbuild -lctor -o ctor && \
+$CXX -std=c++20 -Wall -O3 -Isrc -pthread ctor.cc test/ctor.cc -Lbuild -lctor -o ctor && \
./ctor configure --ctor-includedir=src --ctor-libdir=build && \
echo "Done. Now run ./ctor to (re)build."