1
1
mirror of https://github.com/rui314/mold.git synced 2024-10-04 00:31:41 +03:00
mold/test/response-file.sh
2024-08-14 16:23:25 +09:00

21 lines
313 B
Bash
Executable File

#!/bin/bash
. $(dirname $0)/common.inc
cat <<EOF | $CC -c -o $t/a.o -xc -
void foo();
void bar();
int main() { foo(); bar(); }
EOF
cat <<EOF | $CC -c -o $t/b.o -xc -
void foo() {}
EOF
cat <<EOF | $CC -c -o $t/c.o -xc -
void bar() {}
EOF
echo "'$t/b.o' '$t/c.o'" > $t/rsp
$CC -B. -o $t/exe $t/a.o -Wl,@$t/rsp