mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2024-08-17 01:10:28 +03: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: https://github.com/SerenityOS/serenity/commit/017009437d Pull-request: https://github.com/SerenityOS/serenity/pull/24528 Reviewed-by: https://github.com/ADKaster ✅
@ -79,12 +79,21 @@ config("compiler_defaults") {
|
||||
# Linetables always go in the .o file, even with -gsplit-dwarf, so there's
|
||||
# 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) {
|
||||
ldflags += [ "-Wl,--color-diagnostics" ]
|
||||
@ -103,11 +112,14 @@ config("compiler_defaults") {
|
||||
cflags += [
|
||||
"-Wall",
|
||||
"-Wextra",
|
||||
"-Werror",
|
||||
]
|
||||
cflags += [
|
||||
"-Wno-unused-parameter",
|
||||
"-Wno-invalid-offsetof",
|
||||
"-Wno-unknown-warning-option",
|
||||
"-Wno-unused-parameter",
|
||||
]
|
||||
|
||||
if (is_clang) {
|
||||
cflags += [
|
||||
"-Wdelete-non-virtual-dtor",
|
||||
@ -116,6 +128,7 @@ config("compiler_defaults") {
|
||||
"-fconstexpr-steps=16777216",
|
||||
"-Wno-unused-private-field",
|
||||
"-Wno-implicit-const-int-float-conversion",
|
||||
"-Wno-vla-cxx-extension",
|
||||
]
|
||||
} else {
|
||||
cflags += [
|
||||
@ -166,7 +179,10 @@ config("compiler_defaults") {
|
||||
"-isysroot",
|
||||
rebase_path(sdk_path, root_build_dir),
|
||||
]
|
||||
} else {
|
||||
cflags += [ "-fno-semantic-interposition" ]
|
||||
}
|
||||
|
||||
if (sysroot != "" && current_os != "win" && is_clang) {
|
||||
cflags += [ "-Wpoison-system-directories" ]
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user