llvm/tests/binutils-plugin-ar/test.sh

8 lines
152 B
Bash
Raw Normal View History

2021-07-15 07:55:00 +00:00
#!/bin/sh -eux
set pipefail
echo "void lto_function(){}" | clang -flto -O2 -c -x c -o foo.o -
ar crs foo.a foo.o
readelf -c foo.a | grep lto_function