[llvm] r294725 - Fix doc for `-opt-bisect-limit`: the LTO option is linker specific

Davide Italiano via llvm-commits llvm-commits at lists.llvm.org
Fri Feb 10 09:31:26 PST 2017


On Fri, Feb 10, 2017 at 9:21 AM, Mehdi Amini <mehdi.amini at apple.com> wrote:
>
> On Feb 10, 2017, at 9:19 AM, Davide Italiano <davide at freebsd.org> wrote:
>
> On Thu, Feb 9, 2017 at 11:21 PM, Mehdi Amini via llvm-commits
> <llvm-commits at lists.llvm.org> wrote:
>
> Author: mehdi_amini
> Date: Fri Feb 10 01:21:06 2017
> New Revision: 294725
>
> URL: http://llvm.org/viewvc/llvm-project?rev=294725&view=rev
> Log:
> Fix doc for `-opt-bisect-limit`: the LTO option is linker specific
>
> Modified:
>    llvm/trunk/docs/OptBisect.rst
>
> Modified: llvm/trunk/docs/OptBisect.rst
> URL:
> http://llvm.org/viewvc/llvm-project/llvm/trunk/docs/OptBisect.rst?rev=294725&r1=294724&r2=294725&view=diff
> ==============================================================================
> --- llvm/trunk/docs/OptBisect.rst (original)
> +++ llvm/trunk/docs/OptBisect.rst Fri Feb 10 01:21:06 2017
> @@ -60,12 +60,15 @@ like this:
>   clang -O2 -mllvm -opt-bisect-limit=256 my_file.c
>
> The -opt-bisect-limit option may also be applied to link-time optimizations
> by
> -using a prefix to indicate that this is a plug-in option for the linker.
> The
> +using a prefix to indicate that this is a plug-in option for the linker.
> The
> following syntax will set a bisect limit for LTO transformations:
>
> ::
>
> +  # When using Gold or lld
>   clang -flto -Wl,-plugin-opt,-opt-bisect-limit=256 my_file.o
> my_other_file.o
> +  # When using ld64 (macOS)
>
>
> I don't think this is quite right. lld knows about `-mllvm` (and
> doesn't really care about `-plugin-opt`, which is accepted for
> compatibility but ignored). So I guess the correct spelling for lld is
> `-Wl,-mllvm`.
>
>
> Thanks for noticing! I’ll update.
>
> (I thought that lld options were “compatible” with Gold, I should have
> checked).
>

Ideally we should (there's a PR open about it
https://llvm.org/bugs/show_bug.cgi?id=30720).

-- 
Davide

"There are no solved problems; there are only problems that are more
or less solved" -- Henri Poincare


More information about the llvm-commits mailing list