mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-11-26 01:20:25 +00:00
Toolchain: Enable native host optimizations when building toolchain
-march=native specializes the binaries for the CPU features available on the CPU the binary is being compiled on. This matches the needs of the Toolchain, as it's always built and used on that machine only. This should be safe for the github actions VMs as well, as they all run on a standard VM SKU in "the cloud". I saw small but notable improvements in end-2-end build times in my local testing. Each compilation unit is on average around a second faster on my Intel(R) Core(TM) i7-8705G CPU @ 3.10GHz.
This commit is contained in:
parent
413d98fb45
commit
17ff895e1c
Notes:
sideshowbarker
2024-07-18 17:38:32 +09:00
Author: https://github.com/bgianfo Commit: https://github.com/SerenityOS/serenity/commit/17ff895e1cb Pull-request: https://github.com/SerenityOS/serenity/pull/7335
1 changed files with 2 additions and 2 deletions
|
@ -31,8 +31,8 @@ SYSTEM_NAME="$(uname -s)"
|
|||
# We *most definitely* don't need debug symbols in the linker/compiler.
|
||||
# This cuts the uncompressed size from 1.2 GiB per Toolchain down to about 120 MiB.
|
||||
# Hence, this might actually cause marginal speedups, although the point is to not waste space as blatantly.
|
||||
export CFLAGS="-g0 -O2"
|
||||
export CXXFLAGS="-g0 -O2"
|
||||
export CFLAGS="-g0 -O2 -march=native"
|
||||
export CXXFLAGS="-g0 -O2 -march=native"
|
||||
|
||||
if [ "$SYSTEM_NAME" = "OpenBSD" ]; then
|
||||
MAKE=gmake
|
||||
|
|
Loading…
Reference in a new issue