This website requires JavaScript.
Explore
Help
Sign In
LadybirdBrowser
/
ladybird
Watch
1
Star
1
Fork
0
You've already forked ladybird
mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced
2024-11-11 01:06:01 +03:00
Code
Issues
Packages
Projects
Releases
Wiki
Activity
55c099c953
ladybird
/
Userland
/
Libraries
/
LibMain
/
CMakeLists.txt
7 lines
98 B
CMake
Raw
Normal View
History
Unescape
Escape
LibMain: Add a new library for more ergonomic userspace entry functions By linking with LibMain, your program no longer needs to provide main(). Instead, execution begins in this function: ErrorOr<int> serenity_main(Main::Arguments); This allows programs that link with LibMain to use TRY() already in their entry function, without having to do manual ErrorOr unwrapping. This is very experimental, but it seems like a nice idea so let's try it out. :^)
2021-11-22 17:44:54 +03:00
set
(
SOURCES
M
a
i
n
.
c
p
p
)
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.
2022-03-23 03:37:02 +03:00
serenity_lib_static
(
LibMain
main
)
LibMain: Add a new library for more ergonomic userspace entry functions By linking with LibMain, your program no longer needs to provide main(). Instead, execution begins in this function: ErrorOr<int> serenity_main(Main::Arguments); This allows programs that link with LibMain to use TRY() already in their entry function, without having to do manual ErrorOr unwrapping. This is very experimental, but it seems like a nice idea so let's try it out. :^)
2021-11-22 17:44:54 +03:00
target_link_libraries
(
LibMain
LibC
)
Reference in New Issue
Copy Permalink