fixed build configuration
This commit is contained in:
parent
20e9c19ccd
commit
eb0ae4665f
@ -1,3 +1,7 @@
|
||||
[unstable]
|
||||
build-std = [ "std", "panic_abort" ]
|
||||
build-std-features = [ "panic_immediate_abort" ]
|
||||
|
||||
[profile.release]
|
||||
strip = true # strip symbols from the binary
|
||||
opt-level = "z" # optimize for size
|
||||
|
35
build.sh
35
build.sh
@ -1,35 +0,0 @@
|
||||
#!/bin/sh
|
||||
|
||||
# Copyright (c) 2022 YAC
|
||||
# SPDX-License-Identifier: AGPL-3.0-or-later
|
||||
|
||||
# This file is part of YAC coreutils.
|
||||
#
|
||||
# YAC coreutils is free software: you can redistribute it and/or modify it
|
||||
# under the terms of the GNU Affero General Public License as published by the
|
||||
# Free Software Foundation, either version 3 of the License, or (at your
|
||||
# option) any later version.
|
||||
#
|
||||
# YAC coreutils is distributed in the hope that it will be useful, but WITHOUT
|
||||
# ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
||||
# FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
||||
# details.
|
||||
#
|
||||
# You should have received a copy of the GNU Affero General Public License
|
||||
# along with this program. If not, see https://www.gnu.org/licenses/.
|
||||
|
||||
if ! test -n "$1"; then
|
||||
printf "Usage: %s [target]\n" "$0" 1>&2
|
||||
printf "For a list of targets, type 'rustc --print target-list'\n" 1>&2
|
||||
exit 64 # sysexits(3) EX_USAGE
|
||||
fi
|
||||
|
||||
if ! command -v cargo >/dev/null; then
|
||||
printf "%s: Missing dependency: cargo(1)\n" "$0" 1>&2
|
||||
exit 69 # syexits(3) EX_UNAVAILABLE
|
||||
fi
|
||||
|
||||
cargo build --release \
|
||||
-Z build-std=std,panic_abort \
|
||||
-Z build-std-features=panic_immediate_abort \
|
||||
--target "$1"
|
Reference in New Issue
Block a user