diff options
author | Rafael Espindola <rafael.espindola@gmail.com> | 2010-05-06 21:06:04 +0000 |
---|---|---|
committer | Rafael Espindola <rafael.espindola@gmail.com> | 2010-05-06 21:06:04 +0000 |
commit | 9cf933a67e54bea5475c5027fee2c1cf7365ee05 (patch) | |
tree | f31c2bd305e72303fb6ddb06fef89f6d8c76ee81 | |
parent | 4cadeec91b805bba64a720c6ad85052e97b5b30c (diff) |
Handle -ffunction-sections and -fdata-sections in the driver.
git-svn-id: https://llvm.org/svn/llvm-project/cfe/trunk@103197 91177308-0d34-0410-b5e6-96231b3b80d8
-rw-r--r-- | include/clang/Driver/Options.td | 2 | ||||
-rw-r--r-- | lib/Driver/Tools.cpp | 3 |
2 files changed, 5 insertions, 0 deletions
diff --git a/include/clang/Driver/Options.td b/include/clang/Driver/Options.td index 414551beac..9f9a4eeb37 100644 --- a/include/clang/Driver/Options.td +++ b/include/clang/Driver/Options.td @@ -385,6 +385,8 @@ def fverbose_asm : Flag<"-fverbose-asm">, Group<f_Group>; def fvisibility_EQ : Joined<"-fvisibility=">, Group<f_Group>; def fwritable_strings : Flag<"-fwritable-strings">, Group<f_Group>; def fzero_initialized_in_bss : Flag<"-fzero-initialized-in-bss">, Group<f_Group>; +def ffunction_sections: Flag <"-ffunction-sections">, Group<f_Group>; +def fdata_sections : Flag <"-fdata-sections">, Group<f_Group>; def f : Joined<"-f">, Group<f_Group>; def g0 : Joined<"-g0">, Group<g_Group>; def g3 : Joined<"-g3">, Group<g_Group>; diff --git a/lib/Driver/Tools.cpp b/lib/Driver/Tools.cpp index 4622e2d2ea..f3ec23c3a7 100644 --- a/lib/Driver/Tools.cpp +++ b/lib/Driver/Tools.cpp @@ -996,6 +996,9 @@ void Clang::ConstructJob(Compilation &C, const JobAction &JA, if (Garg && Garg != Args.getLastArg(options::OPT_g0)) CmdArgs.push_back("-g"); + Args.AddAllArgs(CmdArgs, options::OPT_ffunction_sections); + Args.AddAllArgs(CmdArgs, options::OPT_fdata_sections); + Args.AddLastArg(CmdArgs, options::OPT_nostdinc); Args.AddLastArg(CmdArgs, options::OPT_nostdincxx); Args.AddLastArg(CmdArgs, options::OPT_nobuiltininc); |