From 9a1993f0e7b2ba7d8eca6edab76dfa4207cea59a Mon Sep 17 00:00:00 2001 From: Andrey Arutiunian <110744283+andreylzmw@users.noreply.github.com> Date: Tue, 16 Jan 2024 19:43:55 +0300 Subject: [PATCH] Disable LTO (#954) Started from ubuntu 21.04 there is default LTO optimisation for all installing deb package include kphp. It's causes errors then kphp transpiling php script. Fix is just flag to disable LTO. --- compiler/kphp2cpp.cpp | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compiler/kphp2cpp.cpp b/compiler/kphp2cpp.cpp index 10acff8810..9d685d4d88 100644 --- a/compiler/kphp2cpp.cpp +++ b/compiler/kphp2cpp.cpp @@ -182,7 +182,7 @@ std::string get_default_extra_cxxflags() noexcept { } std::string get_default_extra_ldflags() noexcept { - std::string flags{"-L${KPHP_PATH}/objs/flex -ggdb"}; + std::string flags{"-L${KPHP_PATH}/objs/flex -ggdb -fno-lto"}; #ifdef KPHP_HAS_NO_PIE flags += " " KPHP_HAS_NO_PIE; #endif