mirror of
https://github.com/rui314/mold.git
synced 2024-10-26 21:20:46 +03:00
2b67afb8a3
We no longer use `sold` as a command name.
24 lines
469 B
Bash
Executable File
24 lines
469 B
Bash
Executable File
#!/bin/bash
|
|
. $(dirname $0)/common.inc
|
|
|
|
[ "$CC" = cc ] || skip
|
|
|
|
# ASAN doesn't work with LD_PRELOAD
|
|
nm mold-wrapper.so | grep -q '__[at]san_init' && skip
|
|
|
|
clang --version >& /dev/null || skip
|
|
|
|
cat <<'EOF' | $CC -xc -c -o $t/a.o -
|
|
#include <stdio.h>
|
|
|
|
int main() {
|
|
printf("Hello\n");
|
|
return 0;
|
|
}
|
|
EOF
|
|
|
|
LD_PRELOAD=`pwd`/mold-wrapper.so MOLD_PATH=`pwd`/mold \
|
|
clang -no-pie -o $t/exe $t/a.o -fuse-ld=/usr/bin/ld
|
|
readelf -p .comment $t/exe > $t/log
|
|
grep -q mold $t/log
|