llvm-config linking too much?

When trying to link a program with LLVM on Linux, I’m getting an error message that main is defined twice. As far as I can see, the problem is that ‘llvm-config --libs’ says -lgtest_main, which seems to be some sort of test file that contains its own definition of main.

What’s the recommended solution to this, or is there something I’m missing?