#!/bin/bash export LANG= set -e cd $(dirname $0) mold=`pwd`/../../ld64.mold echo -n "Testing $(basename -s .sh $0) ... " t=$(pwd)/../../out/test/macho/$(basename -s .sh $0) mkdir -p $t cat < void hello() { printf("Hello world\n"); } EOF cat < $t/filelist $t/a.o $t/b.o EOF clang -fuse-ld=$mold -o $t/exe -Wl,-filelist,$t/filelist $t/exe | grep -q 'Hello world' echo OK