Skip to content

Commit

Permalink
Disable LTO (#954)
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
andarut authored Jan 16, 2024
1 parent d57f9fe commit 9a1993f
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion compiler/kphp2cpp.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 9a1993f

Please sign in to comment.