# http://blog.llvm.org/2019/11/deterministic-builds-with-clang-and-lld.html
# for more information.
use_relative_paths_in_debug_info = false
+
+ # The version of host gcc. Ignored if is_clang is true.
+ gcc_version = 9
}
assert(!llvm_build_instrumented_coverage || is_clang,
# useful.
"-Wno-noexcept-type",
]
+ if (gcc_version >= 8) {
+ cflags_cc += [
+ # Disable -Wclass-memaccess, a C++-only warning from GCC 8 that fires
+ # on LLVM's ADT classes.
+ "-Wno-class-memaccess",
+ ]
+ }
+ if (gcc_version >= 9) {
+ cflags_cc += [
+ # Disable -Wredundant-move on GCC>=9. GCC wants to remove std::move
+ # in code like "A foo(ConvertibleToA a) { return std::move(a); }",
+ # but this code does not compile (or uses the copy constructor
+ # instead) on clang<=3.8. Clang also has a -Wredundant-move, but it
+ # only fires when the types match exactly, so we can keep it here.
+ "-Wno-redundant-move",
+ ]
+ }
}
if (is_clang && use_goma) {
# goma converts all paths to lowercase on the server, breaking this