diff options
author | Petr Hosek <phosek@google.com> | 2024-05-07 09:18:55 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-05-07 09:18:55 -0700 |
commit | 8bcb0737056163686e967821bea7f9e87c57cdfc (patch) | |
tree | d7dfa658e2947f31c0c32aeee7aeeea1ca47a0f7 /clang/lib/CodeGen/BackendUtil.cpp | |
parent | e74a7a9fd79a74073277471243a44527c71eb4a9 (diff) | |
download | llvm-8bcb0737056163686e967821bea7f9e87c57cdfc.zip llvm-8bcb0737056163686e967821bea7f9e87c57cdfc.tar.gz llvm-8bcb0737056163686e967821bea7f9e87c57cdfc.tar.bz2 |
[Clang] -fseparate-named-sections option (#91028)
When set, the compiler will use separate unique sections for global
symbols in named special sections (e.g. symbols that are annotated with
__attribute__((section(...)))). Doing so enables linker GC to collect
unused symbols without having to use a different section per-symbol.
Diffstat (limited to 'clang/lib/CodeGen/BackendUtil.cpp')
-rw-r--r-- | clang/lib/CodeGen/BackendUtil.cpp | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/clang/lib/CodeGen/BackendUtil.cpp b/clang/lib/CodeGen/BackendUtil.cpp index 22c3f86..119ec47 100644 --- a/clang/lib/CodeGen/BackendUtil.cpp +++ b/clang/lib/CodeGen/BackendUtil.cpp @@ -423,6 +423,7 @@ static bool initTargetOptions(DiagnosticsEngine &Diags, Options.UniqueSectionNames = CodeGenOpts.UniqueSectionNames; Options.UniqueBasicBlockSectionNames = CodeGenOpts.UniqueBasicBlockSectionNames; + Options.SeparateNamedSections = CodeGenOpts.SeparateNamedSections; Options.TLSSize = CodeGenOpts.TLSSize; Options.EnableTLSDESC = CodeGenOpts.EnableTLSDESC; Options.EmulatedTLS = CodeGenOpts.EmulatedTLS; |