diff --git a/.build.sh b/.build.sh index 63a4bbb..99cd3cf 100644 --- a/.build.sh +++ b/.build.sh @@ -39,3 +39,21 @@ make_maxthreads() { JOBS="${JOBS//[^0-9]/}" make -j"$JOBS" } + +# alias build_rust="cargo build -r" +build_rust () { + cargo build \ + --release \ + --config 'panic="abort"' \ + --config 'lto="fat"' \ + --config 'codegen-units=1' \ + "$@" +} + +# just disabling debugging +build_go () { + go build -v \ + -trimpath \ + -ldflags "-s -w -buildid=" \ + "$@" +} diff --git a/build_hr.sh b/build_hr.sh index 3566134..0e25371 100755 --- a/build_hr.sh +++ b/build_hr.sh @@ -17,13 +17,7 @@ set_cflags echo echo '==> Building resolve' -cargo build \ - --release \ - --bin resolve \ - --features dnssec-ring \ - --config 'panic="abort"' \ - --config 'lto="fat"' \ - --config 'codegen-units=1' +build_rust --bin resolve --features dnssec-ring echo echo '==> Done'