diff options
| author | Hans Wennborg <hans@hanshq.net> | 2014-03-25 17:50:25 +0000 |
|---|---|---|
| committer | Hans Wennborg <hans@hanshq.net> | 2014-03-25 17:50:25 +0000 |
| commit | d8d49ba20e58691914a43d54b8b479c8f36cc0c3 (patch) | |
| tree | dd261fc492f65b21603bd323a66d6096094ea665 /clang/lib/Driver/Tools.cpp | |
| parent | 4beef4c90d1600ea58f6451aa5874b177de33b1d (diff) | |
| download | bcm5719-llvm-d8d49ba20e58691914a43d54b8b479c8f36cc0c3.tar.gz bcm5719-llvm-d8d49ba20e58691914a43d54b8b479c8f36cc0c3.zip | |
clang-cl: make /Gy imply -fdata-sections in addition to -ffunction-sections
llvm-svn: 204736
Diffstat (limited to 'clang/lib/Driver/Tools.cpp')
| -rw-r--r-- | clang/lib/Driver/Tools.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/clang/lib/Driver/Tools.cpp b/clang/lib/Driver/Tools.cpp index 49d73f678fc..ef3e00329dd 100644 --- a/clang/lib/Driver/Tools.cpp +++ b/clang/lib/Driver/Tools.cpp @@ -4135,6 +4135,12 @@ void Clang::AddClangCLArgs(const ArgList &Args, ArgStringList &CmdArgs) const { if (!Args.hasArg(options::OPT_frtti, options::OPT_fno_rtti)) CmdArgs.push_back("-fno-rtti"); + // Let -ffunction-sections imply -fdata-sections. + if (Arg * A = Args.getLastArg(options::OPT_ffunction_sections, + options::OPT_fno_function_sections)) + if (A->getOption().matches(options::OPT_ffunction_sections)) + CmdArgs.push_back("-fdata-sections"); + const Driver &D = getToolChain().getDriver(); Arg *MostGeneralArg = Args.getLastArg(options::OPT__SLASH_vmg); Arg *BestCaseArg = Args.getLastArg(options::OPT__SLASH_vmb); |

