Skip to content

Commit 9f343e6

Browse files
committed
gold_benchmark: enable multiple threads in gold
1 parent c25ad6a commit 9f343e6

File tree

4 files changed

+6
-3
lines changed

4 files changed

+6
-3
lines changed

linker/gold_benchmark/bench

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,6 @@ rm -f "$output_file"
66
echo nogold
77
/usr/bin/time --append --format 'nogold: wall=%es user=%Us system=%Ss %MkB' --output "$output_file" gcc $cflags -o main *.o
88
echo gold
9-
/usr/bin/time --append --format 'gold: wall=%es user=%Us system=%Ss %MkB' --output "$output_file" gcc $cflags -fuse-ld=gold -o main *.o
9+
/usr/bin/time --append --format 'gold: wall=%es user=%Us system=%Ss %MkB' --output "$output_file" gcc $cflags -fuse-ld=gold -Wl,--threads -Wl,--thread-count=`nproc` -o main *.o
1010
echo lld
1111
/usr/bin/time --append --format 'lld: wall=%es user=%Us system=%Ss %MkB' --output "$output_file" gcc $cflags -fuse-ld=lld -o main *.o

linker/gold_benchmark/clean

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,3 @@
11
#!/usr/bin/env bash
2-
echo *.c *.h *.o main | xargs rm -f
2+
./clean-build
3+
rm -f *.log

linker/gold_benchmark/clean-build

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
#!/usr/bin/env bash
2+
echo *.c *.h *.o main | xargs rm -f

linker/gold_benchmark/generate-objects

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ n_funcs="${3:-10}"
1616
cflags='-ggdb3 -O0 -std=c99 -Wall -Wextra -pedantic'
1717

1818
# Cleanup previous generated files objects.
19-
./clean
19+
./clean-build
2020

2121
echo "Generate i_*.c, ints.h and int_sum.h"
2222
rm -f ints.h

0 commit comments

Comments
 (0)