Merge "Only set -Wall once."
This commit is contained in:
@@ -4041,7 +4041,7 @@ func TestIncludeDirectoryOrdering(t *testing.T) {
|
|||||||
conly := []string{"-fPIC", "${config.CommonGlobalConlyflags}"}
|
conly := []string{"-fPIC", "${config.CommonGlobalConlyflags}"}
|
||||||
cppOnly := []string{"-fPIC", "${config.CommonGlobalCppflags}", "${config.DeviceGlobalCppflags}", "${config.ArmCppflags}"}
|
cppOnly := []string{"-fPIC", "${config.CommonGlobalCppflags}", "${config.DeviceGlobalCppflags}", "${config.ArmCppflags}"}
|
||||||
|
|
||||||
cflags := []string{"-Wall", "-Werror", "-std=candcpp"}
|
cflags := []string{"-Werror", "-std=candcpp"}
|
||||||
cstd := []string{"-std=gnu11", "-std=conly"}
|
cstd := []string{"-std=gnu11", "-std=conly"}
|
||||||
cppstd := []string{"-std=gnu++17", "-std=cpp", "-fno-rtti"}
|
cppstd := []string{"-std=gnu++17", "-std=cpp", "-fno-rtti"}
|
||||||
|
|
||||||
|
@@ -590,9 +590,8 @@ func (compiler *baseCompiler) compilerFlags(ctx ModuleContext, flags Flags, deps
|
|||||||
} else if !inList("-Werror", flags.Local.CFlags) && !inList("-Werror", flags.Local.CppFlags) {
|
} else if !inList("-Werror", flags.Local.CFlags) && !inList("-Werror", flags.Local.CppFlags) {
|
||||||
if warningsAreAllowed(ctx.ModuleDir()) {
|
if warningsAreAllowed(ctx.ModuleDir()) {
|
||||||
addToModuleList(ctx, modulesAddedWallKey, module)
|
addToModuleList(ctx, modulesAddedWallKey, module)
|
||||||
flags.Local.CFlags = append([]string{"-Wall"}, flags.Local.CFlags...)
|
|
||||||
} else {
|
} else {
|
||||||
flags.Local.CFlags = append([]string{"-Wall", "-Werror"}, flags.Local.CFlags...)
|
flags.Local.CFlags = append([]string{"-Werror"}, flags.Local.CFlags...)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user