build: support LTO in depends

No Qt for now.
This commit is contained in:
fanquake
2021-11-16 10:01:38 +08:00
parent 9e4fbebcc8
commit 094772656d
11 changed files with 55 additions and 3 deletions

View File

@@ -1,7 +1,7 @@
#!/usr/bin/env bash
# Usage: env [ CC=... ] [ CXX=... ] [ AR=... ] [ RANLIB=... ] [ STRIP=... ] \
# [ DEBUG=... ] ./build-id [ID_SALT]...
# [ DEBUG=... ] [ LTO=... ] ./build-id [ID_SALT]...
#
# Prints to stdout a SHA256 hash representing the current toolset, used by
# depends/Makefile as a build id for caching purposes (detecting when the
@@ -63,6 +63,10 @@
env | grep '^STRIP_'
echo "END STRIP"
echo "BEGIN LTO"
echo "LTO=${LTO}"
echo "END LTO"
echo "END ALL"
) | if [ -n "$DEBUG" ] && command -v tee > /dev/null 2>&1; then
# When debugging and `tee` is available, output the preimage to stderr