Skip to content

Commit

Permalink
Fix doc for -opt-bisect-limit: the LTO option is linker specific
Browse files Browse the repository at this point in the history
git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@294725 91177308-0d34-0410-b5e6-96231b3b80d8
  • Loading branch information
joker-eph committed Feb 10, 2017
1 parent f4df3d4 commit 2fabd44
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion docs/OptBisect.rst
Original file line number Diff line number Diff line change
Expand Up @@ -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)
clang -flto -Wl,-mllvm,-opt-bisect-limit=256 my_file.o my_other_file.o

LTO passes are run by a library instance invoked by the linker. Therefore any
passes run in the primary driver compilation phase are not affected by options
Expand Down

0 comments on commit 2fabd44

Please sign in to comment.