Skip to content

Commit ccfa386

Browse files
committed
Make LTO opt-in by default instead of opt-out
LTO has caused problems to a few users (see issues linked at the bottom). The problem is the runtime is built as a static library by default unless otherwise specified via CMake flags, and also LTO is enabled by default. Those two things combined means the user must turn on LTO when they build their application if they're using GCC. Since we don't have evidence that LTO is making a substantial difference in the runtime, it seems prudent to leave the option but turn if off by default. Issues where this has been reported: awslabs#151 awslabs#128
1 parent 9e2c1a3 commit ccfa386

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ project(aws-lambda-runtime
44
VERSION 0.0.0
55
LANGUAGES CXX)
66

7-
option(ENABLE_LTO "Enables link-time optimization, requires compiler support." ON)
7+
option(ENABLE_LTO "Enables link-time optimization, requires compiler support." OFF)
88
option(ENABLE_TESTS "Enables building the test project, requires AWS C++ SDK." OFF)
99

1010
add_library(${PROJECT_NAME}

0 commit comments

Comments
 (0)