compiler: Enable -Werror=date-time for C/C++ code in release builds.

We advertise reproducible builds for release modes, so let's help users achieve
that in C/C++ code. Users can still override this manually if they really want.
This commit is contained in:
Alex Rønne Petersen 2024-07-27 08:18:48 +02:00 committed by Andrew Kelley
parent c37fe4b678
commit 27507ad971

View File

@ -5734,6 +5734,10 @@ pub fn addCCArgs(
},
}
if (mod.optimize_mode != .Debug) {
try argv.append("-Werror=date-time");
}
if (target_util.supports_fpic(target) and mod.pic) {
try argv.append("-fPIC");
}