From 6b07a1c6ee50dcf4d52a4a314b4774347f9b22c0 Mon Sep 17 00:00:00 2001 From: Rafael Espindola Date: Fri, 20 Feb 2015 18:08:57 +0000 Subject: Add -funique-section-names and -fno-unique-section-names options. For now -funique-section-names is the default, so no change in default behavior. The total .o size in a build of llvm and clang goes from 241687775 to 230649031 bytes if -fno-unique-section-names is used. llvm-svn: 230031 --- clang/lib/Frontend/CompilerInvocation.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'clang/lib/Frontend/CompilerInvocation.cpp') diff --git a/clang/lib/Frontend/CompilerInvocation.cpp b/clang/lib/Frontend/CompilerInvocation.cpp index 7a53ced..bfd9429 100644 --- a/clang/lib/Frontend/CompilerInvocation.cpp +++ b/clang/lib/Frontend/CompilerInvocation.cpp @@ -472,6 +472,9 @@ static bool ParseCodeGenArgs(CodeGenOptions &Opts, ArgList &Args, InputKind IK, OPT_fno_function_sections, false); Opts.DataSections = Args.hasFlag(OPT_fdata_sections, OPT_fno_data_sections, false); + Opts.UniqueSectionNames = Args.hasFlag(OPT_funique_section_names, + OPT_fno_unique_section_names, true); + Opts.MergeFunctions = Args.hasArg(OPT_fmerge_functions); Opts.MSVolatile = Args.hasArg(OPT_fms_volatile); -- cgit v1.1