diff --git a/pkgs/development/compilers/gcc/common/configure-flags.nix b/pkgs/development/compilers/gcc/common/configure-flags.nix index b8dccf9fcc57..f8e2ef6508b0 100644 --- a/pkgs/development/compilers/gcc/common/configure-flags.nix +++ b/pkgs/development/compilers/gcc/common/configure-flags.nix @@ -24,6 +24,7 @@ , langObjC , langObjCpp , langJit +, langRust ? false , disableBootstrap ? stdenv.targetPlatform != stdenv.hostPlatform }: @@ -171,6 +172,7 @@ let ++ lib.optional langObjCpp "obj-c++" ++ lib.optionals crossDarwin [ "objc" "obj-c++" ] ++ lib.optional langJit "jit" + ++ lib.optional langRust "rust" ) }" ] diff --git a/pkgs/development/compilers/gcc/common/dependencies.nix b/pkgs/development/compilers/gcc/common/dependencies.nix index fd9036c23ac6..d81a732b4189 100644 --- a/pkgs/development/compilers/gcc/common/dependencies.nix +++ b/pkgs/development/compilers/gcc/common/dependencies.nix @@ -31,6 +31,8 @@ , javaAwtGtk ? false , langAda ? false , langGo ? false +, langRust ? false +, cargo , withoutTargetLibc ? null , threadsCross ? null }: @@ -53,6 +55,7 @@ in ++ optionals javaAwtGtk [ pkg-config ] ++ optionals (with stdenv.targetPlatform; isVc4 || isRedox && flex != null) [ flex ] ++ optionals langAda [ gnat-bootstrap ] + ++ optionals langRust [ cargo ] # The builder relies on GNU sed (for instance, Darwin's `sed' fails with # "-i may not be used with stdin"), and `stdenvNative' doesn't provide it. ++ optionals buildPlatform.isDarwin [ gnused ] diff --git a/pkgs/development/compilers/gcc/default.nix b/pkgs/development/compilers/gcc/default.nix index d69ec08a2ac5..959b570f470c 100644 --- a/pkgs/development/compilers/gcc/default.nix +++ b/pkgs/development/compilers/gcc/default.nix @@ -8,6 +8,8 @@ , reproducibleBuild ? true , profiledCompiler ? false , langJit ? false +, langRust ? false +, cargo , staticCompiler ? false , enableShared ? stdenv.targetPlatform.hasSharedLibraries , enableLTO ? stdenv.hostPlatform.hasSharedLibraries @@ -128,6 +130,7 @@ let inherit binutils buildPackages + cargo cloog withoutTargetLibc darwin @@ -153,6 +156,7 @@ let langJit langObjC langObjCpp + langRust lib libcCross libmpc