feat: add CFLAGS support
This commit is contained in:
@@ -19,6 +19,10 @@ fi
|
|||||||
export MAKEFLAGS="-j${PARALLEL_JOBS}"
|
export MAKEFLAGS="-j${PARALLEL_JOBS}"
|
||||||
export NINJAJOBS="${PARALLEL_JOBS}"
|
export NINJAJOBS="${PARALLEL_JOBS}"
|
||||||
export LC_ALL=C
|
export LC_ALL=C
|
||||||
|
export leaf_flags="CFLAGS CXXFLAGS FCFLAGS FFLAGS RUSTFLAGS"
|
||||||
|
for flag in ${leaf_flags}; do
|
||||||
|
export $flag
|
||||||
|
done
|
||||||
|
|
||||||
declare -A BUILD_OPTIONS
|
declare -A BUILD_OPTIONS
|
||||||
BUILD_OPTIONS=([strip]="0" [libtool]="0" [zipman]="0")
|
BUILD_OPTIONS=([strip]="0" [libtool]="0" [zipman]="0")
|
||||||
@@ -80,6 +84,12 @@ main() {
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
leaf_clear_flags() {
|
||||||
|
for flag in $leaf_flags; do
|
||||||
|
unset $flag
|
||||||
|
done
|
||||||
|
}
|
||||||
|
|
||||||
leaf_check_directories() {
|
leaf_check_directories() {
|
||||||
if [ -z "${BUILD_DIR}" ]; then
|
if [ -z "${BUILD_DIR}" ]; then
|
||||||
leaf_error "Directory \${BUILD_DIR} must be existed"
|
leaf_error "Directory \${BUILD_DIR} must be existed"
|
||||||
|
|||||||
@@ -15,3 +15,11 @@ COMPRESS_PROG="zstd -19 -T0"
|
|||||||
BINARY_EXT=".pkg.tar.zst"
|
BINARY_EXT=".pkg.tar.zst"
|
||||||
|
|
||||||
ENABLE_DEBUG_TREE="true"
|
ENABLE_DEBUG_TREE="true"
|
||||||
|
|
||||||
|
COMMON_FLAGS="-pipe"
|
||||||
|
CFLAGS="${COMMON_FLAGS}"
|
||||||
|
CXXFLAGS="${COMMON_FLAGS}"
|
||||||
|
FCFLAGS="${COMMON_FLAGS}"
|
||||||
|
FFLAGS="${COMMON_FLAGS}"
|
||||||
|
|
||||||
|
RUSTFLAGS="${RUSTFLAGS} -C target-cpu=native"
|
||||||
|
|||||||
Reference in New Issue
Block a user