summaryrefslogtreecommitdiff
path: root/Userland/Libraries/LibMain
diff options
context:
space:
mode:
authorLenny Maiorani <lenny@serenityos.org>2022-03-22 18:37:02 -0600
committerAndreas Kling <kling@serenityos.org>2022-03-24 03:04:57 +0100
commitf7f0195fae3f4a1296213256b5bda12b3264c5dc (patch)
tree032f091788548107bbe6b2b0ef06cd87723fc329 /Userland/Libraries/LibMain
parente08cd4d60845fdf66bfa9171d5c1aba008beaf70 (diff)
downloadserenity-f7f0195fae3f4a1296213256b5bda12b3264c5dc.zip
LibMain: Statically link LibMain
LibMain is dynamically linked in every binary. This results in a slightly slower load time. In the past people have pegged this at 0.7 ms on some hardware. This change makes it statically linked and eliminates 0.6 ms of run-time on my machine. This is tested by running a script which just executed `/bin/true` in a loop 10,000 times. Before this patch it reliably executed in ~90,000 ms. After this patch it is ~84,000 ms. This is a speed up of 6,000 ms over 10,000 executions, or 0.6 ms per execution.
Diffstat (limited to 'Userland/Libraries/LibMain')
-rw-r--r--Userland/Libraries/LibMain/CMakeLists.txt2
1 files changed, 1 insertions, 1 deletions
diff --git a/Userland/Libraries/LibMain/CMakeLists.txt b/Userland/Libraries/LibMain/CMakeLists.txt
index 6dc9cd651d..580f001c20 100644
--- a/Userland/Libraries/LibMain/CMakeLists.txt
+++ b/Userland/Libraries/LibMain/CMakeLists.txt
@@ -2,5 +2,5 @@ set(SOURCES
Main.cpp
)
-serenity_lib(LibMain main)
+serenity_lib_static(LibMain main)
target_link_libraries(LibMain LibC)