summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTor Egge <Tor.Egge@yahooinc.com>2023-04-12 15:57:59 +0200
committerTor Egge <Tor.Egge@yahooinc.com>2023-04-12 15:57:59 +0200
commit46446033423c45016c5556665433b4f18bb986ec (patch)
tree36fa458eb099e9c3dcf54ef9c4e0a64305a52d83
parent26f8880777051c8729c7032db2edff71b959a34b (diff)
Don't convert a call to a jump when this breaks reporting of
stack frames.
-rw-r--r--vespalib/src/tests/signalhandler/CMakeLists.txt5
-rw-r--r--vespalib/src/vespa/vespalib/util/CMakeLists.txt4
2 files changed, 9 insertions, 0 deletions
diff --git a/vespalib/src/tests/signalhandler/CMakeLists.txt b/vespalib/src/tests/signalhandler/CMakeLists.txt
index 4f78eb2e82d..88be14f994f 100644
--- a/vespalib/src/tests/signalhandler/CMakeLists.txt
+++ b/vespalib/src/tests/signalhandler/CMakeLists.txt
@@ -5,6 +5,11 @@ vespa_add_library(vespalib_signalhandler_test_my_shared_library TEST
DEPENDS
vespalib
)
+
+# Don't convert call to jump when returning a value from a function with
+# a compatible stack.
+set_source_files_properties(my_shared_library.cpp PROPERTIES COMPILE_OPTIONS "-fno-optimize-sibling-calls")
+
vespa_add_executable(vespalib_signalhandler_test_app TEST
SOURCES
signalhandler_test.cpp
diff --git a/vespalib/src/vespa/vespalib/util/CMakeLists.txt b/vespalib/src/vespa/vespalib/util/CMakeLists.txt
index 663b3b65638..8ee3957af32 100644
--- a/vespalib/src/vespa/vespalib/util/CMakeLists.txt
+++ b/vespalib/src/vespa/vespalib/util/CMakeLists.txt
@@ -100,3 +100,7 @@ vespa_add_library(vespalib_vespalib_util OBJECT
zstdcompressor.cpp
DEPENDS
)
+
+# Don't convert call to jump when returning a value from a function with
+# a compatible stack.
+set_source_files_properties(signalhandler.cpp PROPERTIES COMPILE_OPTIONS "-fno-optimize-sibling-calls")