summary refs log tree commit diff
path: root/pkgs/development/compilers/gcc/9
diff options
context:
space:
mode:
authorArnout Engelen <arnout@bzzt.net>2021-04-26 11:07:34 +0200
committerGitHub <noreply@github.com>2021-04-26 11:07:34 +0200
commit48c952c039b224ea4bde5afa6c9a9b88fa46e550 (patch)
tree58d97305e19be9d2319754ef2b2de300a36f2b14 /pkgs/development/compilers/gcc/9
parent28c3da370d798800403706d6ad58e2a104c2f6ea (diff)
parenta961aeadae1abcce472014e3d0d7d34f83fe7685 (diff)
Merge pull request #112928 from baloo/baloo/gcc/reproducible
stdenv: provide a deterministically built gcc
Diffstat (limited to 'pkgs/development/compilers/gcc/9')
-rw-r--r--pkgs/development/compilers/gcc/9/default.nix5
1 files changed, 5 insertions, 0 deletions
diff --git a/pkgs/development/compilers/gcc/9/default.nix b/pkgs/development/compilers/gcc/9/default.nix
index 188da39e23c7d..ebe20e0cba5c4 100644
--- a/pkgs/development/compilers/gcc/9/default.nix
+++ b/pkgs/development/compilers/gcc/9/default.nix
@@ -5,6 +5,7 @@
 , langObjCpp ? stdenv.targetPlatform.isDarwin
 , langD ? false
 , langGo ? false
+, reproducibleBuild ? true
 , profiledCompiler ? false
 , langJit ? false
 , staticCompiler ? false
@@ -54,6 +55,10 @@ assert langAda -> gnatboot != null;
 # threadsCross is just for MinGW
 assert threadsCross != null -> stdenv.targetPlatform.isWindows;
 
+# profiledCompiler builds inject non-determinism in one of the compilation stages.
+# If turned on, we can't provide reproducible builds anymore
+assert reproducibleBuild -> profiledCompiler == false;
+
 with lib;
 with builtins;