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]/}"
|
||||
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 '==> 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'
|
||||
|
|
Loading…
Add table
Reference in a new issue