How does -forder-file-instrumentation work with respect to LTO?


I’m interested in using this flag, however I have a few questions. In Clang.cpp it states, “When ThinLTO is on, we need to pass these flags as linker flags and that will be handled outside of the compiler”. When thin LTO is on, does this mean that it doesn’t change the code but rather embeds information within the object file telling the linker to do the order file pass during its LTO phase? Are any flags required to be passed to the linker invocation for this?