Propagate some target options from Clang to Carbon's target. (#6759)

Turn a few section options on by default in Clang's options, and
propagate the setting from Clang to Carbon. These settings can't be
different between the two sides of the compilation, so merging the
behavior of Carbon's defaults and Clang's flags seems best.
This commit is contained in:
Richard Smith
2026-02-18 03:14:31 +00:00
committed by GitHub
parent de3147ce3e
commit 768582d8d3
4 changed files with 75 additions and 7 deletions
+7
View File
@@ -118,6 +118,13 @@ auto AppendDefaultClangArgs(const InstallPaths& install_paths,
// TODO: Decide if we want this.
"-fPIE",
// Enable function and data sections by default, and don't waste object
// file size on unique section names. Allow these to be overridden by
// Clang arguments.
"-ffunction-sections",
"-fdata-sections",
"-fno-unique-section-names",
// Override runtime library defaults.
//
// TODO: We should consider if there is a reasonable way to build Clang