How to print all pass when using -flto floag ?

Hi

We knew that “clang -mllvm -debug-pass=Structure …” can print all pass’ name.

But,

when we use LTO , -flto flag and gold plugin.

I found that the option " -debug-pass=Structure" would not pass to ld.

so it would not print all the LTO pass’s name.

I am not sure but passing either of

“-Wl,-mllvm,-debug-pass=Structure”
“-Wl,-mllvm,-plugin-opt,-debug-pass=Structure”
“-Wl,-mllvm,-plugin-opt=-debug-pass=Structure”

may work.

Thank You~
it works

Hiroshi Yamauchi <yamauchi@google.com> 於 2020年2月26日 週三 上午12:49寫道: