refactor: move cargo build options to .build.sh
This commit is contained in:
parent
37af0426b7
commit
8fa8e98b99
2 changed files with 19 additions and 7 deletions
18
.build.sh
18
.build.sh
|
@ -39,3 +39,21 @@ make_maxthreads() {
|
||||||
JOBS="${JOBS//[^0-9]/}"
|
JOBS="${JOBS//[^0-9]/}"
|
||||||
make -j"$JOBS"
|
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=" \
|
||||||
|
"$@"
|
||||||
|
}
|
||||||
|
|
|
@ -17,13 +17,7 @@ set_cflags
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo '==> Building resolve'
|
echo '==> Building resolve'
|
||||||
cargo build \
|
build_rust --bin resolve --features dnssec-ring
|
||||||
--release \
|
|
||||||
--bin resolve \
|
|
||||||
--features dnssec-ring \
|
|
||||||
--config 'panic="abort"' \
|
|
||||||
--config 'lto="fat"' \
|
|
||||||
--config 'codegen-units=1'
|
|
||||||
|
|
||||||
echo
|
echo
|
||||||
echo '==> Done'
|
echo '==> Done'
|
||||||
|
|
Loading…
Add table
Reference in a new issue