diff --git a/.build.sh b/.build.sh index 31b14ea..d16198c 100644 --- a/.build.sh +++ b/.build.sh @@ -17,6 +17,13 @@ clone () { fi } +# optimizations +set_cflags () { + export \ + CFLAGS="-O3" CPPFLAGS="-O3" LDFLAGS="-Wl,-O3 -Wl,-S" \ + RUSTFLAGS="-C target-cpu=native" +} + # make -j12 make_maxthreads() { [ -v JOBS ] || JOBS=$(nproc || echo 4) diff --git a/build_dig.sh b/build_dig.sh index bf3461e..35c6ebf 100755 --- a/build_dig.sh +++ b/build_dig.sh @@ -15,7 +15,7 @@ clone https://gitlab.isc.org/isc-projects/bind9.git bind9 cd bind9 trap 'cd ..' EXIT -export CFLAGS="-O3" CPPFLAGS="-O3" +set_cflags echo echo '==> autoreconf -fi' diff --git a/build_drill.sh b/build_drill.sh index cf020a2..03f369a 100755 --- a/build_drill.sh +++ b/build_drill.sh @@ -16,7 +16,7 @@ clone https://github.com/NLnetLabs/ldns.git ldns cd ldns trap 'cd ..' EXIT -export CFLAGS="-O3" +set_cflags echo echo '==> libtoolize -ci' diff --git a/build_hr.sh b/build_hr.sh index 9fb25f3..d5a5ddc 100755 --- a/build_hr.sh +++ b/build_hr.sh @@ -13,6 +13,7 @@ clone https://github.com/hickory-dns/hickory-dns.git hickory-dns cd hickory-dns trap 'cd ..' EXIT +set_cflags echo echo '==> Building resolve'