Skip to content

Commit fc043d8

Browse files
committed
Revert "[lld][CMake] Add LLD_DEFAULT_NOSTART_STOP_GC"
This reverts commit 9d9efb1. This commit caused #53185.
1 parent 5869ea6 commit fc043d8

File tree

8 files changed

+0
-26
lines changed

8 files changed

+0
-26
lines changed

lld/CMakeLists.txt

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -176,15 +176,6 @@ if (LLD_DEFAULT_LD_LLD_IS_MINGW)
176176
add_definitions("-DLLD_DEFAULT_LD_LLD_IS_MINGW=1")
177177
endif()
178178

179-
option(LLD_DEFAULT_NOSTART_STOP_GC
180-
"Default ld.lld to -z nostart-stop-gc. If ON, C identifier name sections are
181-
forced retained by __start_/__stop_ references. This may increase output size
182-
for many instrumentations, but is compatible with GNU ld newer than 2015-10"
183-
ON)
184-
if (LLD_DEFAULT_NOSTART_STOP_GC)
185-
add_definitions("-DLLD_DEFAULT_NOSTART_STOP_GC=1")
186-
endif()
187-
188179
if (MSVC)
189180
add_definitions(-wd4530) # Suppress 'warning C4530: C++ exception handler used, but unwind semantics are not enabled.'
190181
add_definitions(-wd4062) # Suppress 'warning C4062: enumerator X in switch of enum Y is not handled' from system header.

lld/ELF/Driver.cpp

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1193,17 +1193,8 @@ static void readConfigs(opt::InputArgList &args) {
11931193
config->zSeparate = getZSeparate(args);
11941194
config->zShstk = hasZOption(args, "shstk");
11951195
config->zStackSize = args::getZOptionValue(args, OPT_z, "stack-size", 0);
1196-
#ifdef LLD_DEFAULT_NOSTART_STOP_GC
1197-
// -z start-stop-gc default matches GNU ld<2015-10 and ld64 section$start
1198-
// symbols and can decrease file size for many instrumentations. However,
1199-
// some users need time to accommodate the -z nostart-stop-gc default, so this
1200-
// is added as a temporary workaround.
1201-
config->zStartStopGC =
1202-
getZFlag(args, "start-stop-gc", "nostart-stop-gc", false);
1203-
#else
12041196
config->zStartStopGC =
12051197
getZFlag(args, "start-stop-gc", "nostart-stop-gc", true);
1206-
#endif
12071198
config->zStartStopVisibility = getZStartStopVisibility(args);
12081199
config->zText = getZFlag(args, "text", "notext", true);
12091200
config->zWxneeded = hasZOption(args, "wxneeded");

lld/test/CMakeLists.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@ llvm_canonicalize_cmake_booleans(
1111
LLVM_ENABLE_ZLIB
1212
LLVM_ENABLE_LIBXML2
1313
LLD_DEFAULT_LD_LLD_IS_MINGW
14-
LLD_DEFAULT_NOSTART_STOP_GC
1514
LLVM_HAVE_LIBXAR
1615
)
1716

lld/test/ELF/gc-sections-metadata-startstop.s

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# REQUIRES: x86
2-
# UNSUPPORTED: default-nostart-stop-gc
32
# LINK_ORDER cnamed sections are not kept alive by the __start_* reference.
43

54
# RUN: llvm-mc -filetype=obj -triple=x86_64-pc-linux %s -o %t.o

lld/test/ELF/gc-sections-startstop-hint.s

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
# REQUIRES: x86
2-
# UNSUPPORTED: default-nostart-stop-gc
32
## Some projects may not work with GNU ld<2015-10 (ld.lld 13.0.0) --gc-sections behavior.
43
## Give a hint.
54

lld/test/ELF/gc-sections-startstop.s

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
## Check that group members are retained or discarded as a unit.
22

33
# REQUIRES: x86
4-
# UNSUPPORTED: default-nostart-stop-gc
54

65
# RUN: llvm-mc -filetype=obj -triple=x86_64-unknown-linux %s -o %t.o
76
# RUN: ld.lld %t.o --gc-sections -o %t

lld/test/lit.cfg.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,3 @@
118118
# ELF tests expect the default target for ld.lld to be ELF.
119119
if config.ld_lld_default_mingw:
120120
config.excludes.append('ELF')
121-
122-
if config.ld_lld_default_nostart_stop_gc:
123-
config.available_features.add('default-nostart-stop-gc')

lld/test/lit.site.cfg.py.in

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ config.have_libxar = @LLVM_HAVE_LIBXAR@
1919
config.have_libxml2 = @LLVM_ENABLE_LIBXML2@
2020
config.sizeof_void_p = @CMAKE_SIZEOF_VOID_P@
2121
config.ld_lld_default_mingw = @LLD_DEFAULT_LD_LLD_IS_MINGW@
22-
config.ld_lld_default_nostart_stop_gc = @LLD_DEFAULT_NOSTART_STOP_GC@
2322

2423
# Support substitution of the tools and libs dirs with user parameters. This is
2524
# used when we can't determine the tool dir at configuration time.

0 commit comments

Comments
 (0)