[PATCH] D61627: [clang driver] Allow -fembed-bitcode combined with -mno-red-zone

Anders Waldenborg via Phabricator via cfe-commits cfe-commits at lists.llvm.org
Mon May 6 23:11:53 PDT 2019


wanders created this revision.
wanders added reviewers: steven_wu, compnerd, rsmith.
wanders added a project: clang.
Herald added a subscriber: dexonsmith.

The -mno-red-zone (and the option to cancel it out: -mred-zone) were not
allowed to be combined with -fembed-bitcode. However this option has a
direct effect on the generated bitcode as it adds the 'noredzone'
attribute on all functions. This means it is propagated into the
embedded bitcode and it is possible to regenerate the same object from
the embedded bitcode. Therefore there is no reason to forbid it.


Repository:
  rG LLVM Github Monorepo

https://reviews.llvm.org/D61627

Files:
  clang/lib/Driver/ToolChains/Clang.cpp


Index: clang/lib/Driver/ToolChains/Clang.cpp
===================================================================
--- clang/lib/Driver/ToolChains/Clang.cpp
+++ clang/lib/Driver/ToolChains/Clang.cpp
@@ -3674,8 +3674,6 @@
         options::OPT_ffixed_x18,
         options::OPT_mglobal_merge,
         options::OPT_mno_global_merge,
-        options::OPT_mred_zone,
-        options::OPT_mno_red_zone,
         options::OPT_Wa_COMMA,
         options::OPT_Xassembler,
         options::OPT_mllvm,


-------------- next part --------------
A non-text attachment was scrubbed...
Name: D61627.198396.patch
Type: text/x-patch
Size: 494 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190507/5fa2b628/attachment.bin>


More information about the cfe-commits mailing list