Passing arguments to LTOCodeGenerator

In LTOCodeGenerator.cpp there are some options related to optimization remarks.

On MacOS, I can pass in this option to enable them:

-Wl,-mllvm,-lto-pass-remarks-output=remarks

But on Linux using 2.29.1 binutils version of gold, I try this alternative:

-Wl,–plugin-opt,-lto-pass-remarks-output=remarks

But I get this error message:

LLVMgold: Unknown command line argument ‘–library=to-pass-remarks-output=remarks’. Try: 'LLVMgold -he\

lp’

LLVMgold: Did you mean ‘-no-warn=to-pass-remarks-output=remarks’?

If I try this

-Wl,–plugin-opt=lto-pass-remarks-output=remarks

I get

LLVMgold: Unknown command line argument ‘lto-pass-remarks-output=remarks’. Try: ‘LLVMgold -help’

clang-7: error: linker command failed with exit code 1 (use -v to see invocation)

Any suggestions are welcome,

Thanks

david

I recently added support for opt remarks to the gold plugin, in r330252. The option names are:
-plugin-opt=opt-remarks-with-hotness
-plugin-opt=opt-remarks-filename=[filename]

(I used the same option names as used by lld, which unfortunately is different than the ones added to the old LTO API)

Teresa