[cfe-commits] r103197 - in /cfe/trunk: include/clang/Driver/Options.td lib/Driver/Tools.cpp
Rafael Espindola
rafael.espindola at gmail.com
Thu May 6 14:06:04 PDT 2010
Author: rafael
Date: Thu May 6 16:06:04 2010
New Revision: 103197
URL: http://llvm.org/viewvc/llvm-project?rev=103197&view=rev
Log:
Handle -ffunction-sections and -fdata-sections in the driver.
Modified:
cfe/trunk/include/clang/Driver/Options.td
cfe/trunk/lib/Driver/Tools.cpp
Modified: cfe/trunk/include/clang/Driver/Options.td
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/include/clang/Driver/Options.td?rev=103197&r1=103196&r2=103197&view=diff
==============================================================================
--- cfe/trunk/include/clang/Driver/Options.td (original)
+++ cfe/trunk/include/clang/Driver/Options.td Thu May 6 16:06:04 2010
@@ -385,6 +385,8 @@
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>;
Modified: cfe/trunk/lib/Driver/Tools.cpp
URL: http://llvm.org/viewvc/llvm-project/cfe/trunk/lib/Driver/Tools.cpp?rev=103197&r1=103196&r2=103197&view=diff
==============================================================================
--- cfe/trunk/lib/Driver/Tools.cpp (original)
+++ cfe/trunk/lib/Driver/Tools.cpp Thu May 6 16:06:04 2010
@@ -996,6 +996,9 @@
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);
More information about the cfe-commits
mailing list