diff options
Diffstat (limited to 'clang/lib/Driver/ToolChains/Gnu.cpp')
| -rw-r--r-- | clang/lib/Driver/ToolChains/Gnu.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/clang/lib/Driver/ToolChains/Gnu.cpp b/clang/lib/Driver/ToolChains/Gnu.cpp index a50e5bd6632..f70e5a58c81 100644 --- a/clang/lib/Driver/ToolChains/Gnu.cpp +++ b/clang/lib/Driver/ToolChains/Gnu.cpp @@ -85,6 +85,13 @@ void tools::gcc::Common::ConstructJob(Compilation &C, const JobAction &JA, A->getOption().matches(options::OPT_W_Group)) continue; + // Don't forward -mno-unaligned-access since GCC doesn't understand + // it and because it doesn't affect the assembly or link steps. + if ((isa<AssembleJobAction>(JA) || isa<LinkJobAction>(JA)) && + (A->getOption().matches(options::OPT_munaligned_access) || + A->getOption().matches(options::OPT_mno_unaligned_access))) + continue; + A->render(Args, CmdArgs); } } |

