aboutsummaryrefslogtreecommitdiff
path: root/llvm/lib/CodeGen/CommandFlags.cpp
diff options
context:
space:
mode:
authorJulian Lettner <julian.lettner@apple.com>2023-03-09 11:32:17 -0800
committerJulian Lettner <julian.lettner@apple.com>2023-03-14 14:18:11 -0700
commite6a789ef9bb28222c91816a2cf00cfd6f706efd4 (patch)
treea01b2b0b3d37ad7693bb3d3124926ce454a9b720 /llvm/lib/CodeGen/CommandFlags.cpp
parente48ae0dbd80d58ce8eded9e55f0b1262d52517af (diff)
downloadllvm-e6a789ef9bb28222c91816a2cf00cfd6f706efd4.zip
llvm-e6a789ef9bb28222c91816a2cf00cfd6f706efd4.tar.gz
llvm-e6a789ef9bb28222c91816a2cf00cfd6f706efd4.tar.bz2
Remove -lower-global-dtors-via-cxa-atexit flag
Remove the `-lower-global-dtors-via-cxa-atexit` escape hatch introduced in D121736 [1], which switched the default lowering of global destructors on MachO to use `__cxa_atexit()` to avoid emitting deprecated `__mod_term_func` sections. I added this flag as an escape hatch in case the switch causes any problems. We didn't discover any problems so now we can remove it. [1] https://reviews.llvm.org/D121736 rdar://90277838 Differential Revision: https://reviews.llvm.org/D145715
Diffstat (limited to 'llvm/lib/CodeGen/CommandFlags.cpp')
-rw-r--r--llvm/lib/CodeGen/CommandFlags.cpp8
1 files changed, 0 insertions, 8 deletions
diff --git a/llvm/lib/CodeGen/CommandFlags.cpp b/llvm/lib/CodeGen/CommandFlags.cpp
index 73521ac..51d259c 100644
--- a/llvm/lib/CodeGen/CommandFlags.cpp
+++ b/llvm/lib/CodeGen/CommandFlags.cpp
@@ -81,7 +81,6 @@ CGOPT(bool, StackSymbolOrdering)
CGOPT(bool, StackRealign)
CGOPT(std::string, TrapFuncName)
CGOPT(bool, UseCtors)
-CGOPT(bool, LowerGlobalDtorsViaCxaAtExit)
CGOPT(bool, RelaxELFRelocations)
CGOPT_EXP(bool, DataSections)
CGOPT_EXP(bool, FunctionSections)
@@ -349,12 +348,6 @@ codegen::RegisterCodeGenFlags::RegisterCodeGenFlags() {
cl::init(false));
CGBINDOPT(UseCtors);
- static cl::opt<bool> LowerGlobalDtorsViaCxaAtExit(
- "lower-global-dtors-via-cxa-atexit",
- cl::desc("Lower llvm.global_dtors (global destructors) via __cxa_atexit"),
- cl::init(true));
- CGBINDOPT(LowerGlobalDtorsViaCxaAtExit);
-
static cl::opt<bool> RelaxELFRelocations(
"relax-elf-relocations",
cl::desc(
@@ -538,7 +531,6 @@ codegen::InitTargetOptionsFromCodeGenFlags(const Triple &TheTriple) {
Options.GuaranteedTailCallOpt = getEnableGuaranteedTailCallOpt();
Options.StackSymbolOrdering = getStackSymbolOrdering();
Options.UseInitArray = !getUseCtors();
- Options.LowerGlobalDtorsViaCxaAtExit = getLowerGlobalDtorsViaCxaAtExit();
Options.RelaxELFRelocations = getRelaxELFRelocations();
Options.DataSections =
getExplicitDataSections().value_or(TheTriple.hasDefaultDataSections());