mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-09-03 08:08:43 +00:00
Meta: Update compilation flags in the GN build to match the CMake build
This commit is contained in:
parent
3020c5766e
commit
017009437d
Notes:
sideshowbarker
2024-07-17 11:34:34 +09:00
Author: https://github.com/trflynn89
Commit: 017009437d
Pull-request: https://github.com/SerenityOS/serenity/pull/24528
Reviewed-by: https://github.com/ADKaster ✅
1 changed files with 22 additions and 6 deletions
|
@ -79,12 +79,21 @@ config("compiler_defaults") {
|
||||||
# Linetables always go in the .o file, even with -gsplit-dwarf, so there's
|
# Linetables always go in the .o file, even with -gsplit-dwarf, so there's
|
||||||
# no point in passing -gsplit-dwarf here.
|
# no point in passing -gsplit-dwarf here.
|
||||||
}
|
}
|
||||||
if (is_optimized) {
|
|
||||||
cflags += [ "-O3" ]
|
|
||||||
}
|
|
||||||
cflags += [ "-fdiagnostics-color" ]
|
|
||||||
|
|
||||||
cflags += [ "-ffp-contract=off" ]
|
if (is_optimized) {
|
||||||
|
cflags += [ "-O2" ]
|
||||||
|
}
|
||||||
|
|
||||||
|
cflags += [
|
||||||
|
"-D_FILE_OFFSET_BITS=64",
|
||||||
|
"-DENABLE_COMPILETIME_FORMAT_CHECK",
|
||||||
|
]
|
||||||
|
|
||||||
|
cflags += [
|
||||||
|
"-fdiagnostics-color",
|
||||||
|
"-ffp-contract=off",
|
||||||
|
"-fsigned-char",
|
||||||
|
]
|
||||||
|
|
||||||
if (use_lld) {
|
if (use_lld) {
|
||||||
ldflags += [ "-Wl,--color-diagnostics" ]
|
ldflags += [ "-Wl,--color-diagnostics" ]
|
||||||
|
@ -103,11 +112,14 @@ config("compiler_defaults") {
|
||||||
cflags += [
|
cflags += [
|
||||||
"-Wall",
|
"-Wall",
|
||||||
"-Wextra",
|
"-Wextra",
|
||||||
|
"-Werror",
|
||||||
]
|
]
|
||||||
cflags += [
|
cflags += [
|
||||||
"-Wno-unused-parameter",
|
|
||||||
"-Wno-invalid-offsetof",
|
"-Wno-invalid-offsetof",
|
||||||
|
"-Wno-unknown-warning-option",
|
||||||
|
"-Wno-unused-parameter",
|
||||||
]
|
]
|
||||||
|
|
||||||
if (is_clang) {
|
if (is_clang) {
|
||||||
cflags += [
|
cflags += [
|
||||||
"-Wdelete-non-virtual-dtor",
|
"-Wdelete-non-virtual-dtor",
|
||||||
|
@ -116,6 +128,7 @@ config("compiler_defaults") {
|
||||||
"-fconstexpr-steps=16777216",
|
"-fconstexpr-steps=16777216",
|
||||||
"-Wno-unused-private-field",
|
"-Wno-unused-private-field",
|
||||||
"-Wno-implicit-const-int-float-conversion",
|
"-Wno-implicit-const-int-float-conversion",
|
||||||
|
"-Wno-vla-cxx-extension",
|
||||||
]
|
]
|
||||||
} else {
|
} else {
|
||||||
cflags += [
|
cflags += [
|
||||||
|
@ -166,7 +179,10 @@ config("compiler_defaults") {
|
||||||
"-isysroot",
|
"-isysroot",
|
||||||
rebase_path(sdk_path, root_build_dir),
|
rebase_path(sdk_path, root_build_dir),
|
||||||
]
|
]
|
||||||
|
} else {
|
||||||
|
cflags += [ "-fno-semantic-interposition" ]
|
||||||
}
|
}
|
||||||
|
|
||||||
if (sysroot != "" && current_os != "win" && is_clang) {
|
if (sysroot != "" && current_os != "win" && is_clang) {
|
||||||
cflags += [ "-Wpoison-system-directories" ]
|
cflags += [ "-Wpoison-system-directories" ]
|
||||||
}
|
}
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue