mirror of
https://github.com/SerenityOS/serenity.git
synced 2025-01-23 09:51:57 -05:00
Meta: Update compilation flags in the GN build to match the CMake build
This commit is contained in:
parent
3020c5766e
commit
017009437d
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
|
||||
# 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…
Add table
Reference in a new issue