[PATCH] [CFI] Require -flto instead of implying it.

Alexey Samsonov vonosmas at gmail.com
Thu Jun 18 18:26:46 PDT 2015


Hi pcc,

This is unfortunate, but would let us land http://reviews.llvm.org/D10467,
that makes ToolChains responsible for computing the set of sanitizers
they support.

Unfortunately, Darwin ToolChains doesn't know about actual OS they
target until ToolChain::TranslateArgs() is called. In particular, it
means we won't be able to construct SanitizerArgs for these ToolChains
before that.

This change removes SanitizerArgs::needsLTO() method, so that now
ToolChain::IsUsingLTO(), which is called very early, doesn't need
SanitizerArgs to implement this method.

Docs and test cases are updated accordingly. See
https://llvm.org/bugs/show_bug.cgi?id=23539, which describes why we
start all these.

http://reviews.llvm.org/D10560

Files:
  docs/ControlFlowIntegrity.rst
  docs/UsersManual.rst
  include/clang/Driver/Driver.h
  include/clang/Driver/SanitizerArgs.h
  lib/Driver/Driver.cpp
  lib/Driver/SanitizerArgs.cpp
  lib/Driver/Tools.cpp
  test/Driver/fsanitize.c

EMAIL PREFERENCES
  http://reviews.llvm.org/settings/panel/emailpreferences/
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D10560.27986.patch
Type: text/x-patch
Size: 9243 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20150619/5b80a1c2/attachment.bin>


More information about the cfe-commits mailing list