aboutsummarylogtreecommitdiffstats
path: root/mold.sh.in
blob: 4ddfeede48d702d57ed7c4051f3cbc09989e4392 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
#!/usr/bin/bash
#
#   mold.sh - Compile with the fast mold linker
#

[[ -n "$LIBMAKEPKG_BUILDENV_MOLD_SH" ]] && return
LIBMAKEPKG_BUILDENV_MOLD_SH=1

LIBRARY=${LIBRARY:-'/usr/share/makepkg'}

source "$LIBRARY/util/option.sh"

build_options+=('mold')
buildenv_functions+=('buildenv_mold')

buildenv_mold() {
    if
    check_buildoption "mold" "y"; then
    		LDFLAGS+=",-fuse-ld=mold"
    fi
}