Skip to content
This repository has been archived by the owner on Jun 17, 2020. It is now read-only.

Commit

Permalink
[DEVOPS-36] Build speedups in following of https://issues.serokell.io…
Browse files Browse the repository at this point in the history
  • Loading branch information
deepfire committed Jun 8, 2017
1 parent 706a0eb commit b01f36c
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion default.nix
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,13 @@ let
});
socket-io-src = pkgs.fetchgit (removeAttrs (lib.importJSON ./pkgs/engine-io.json) ["date"]);
cardano-sl-src = pkgs.fetchgit (removeAttrs (lib.importJSON ./pkgs/cardano-sl.json) ["date"]);
cores = 4;
threads = 8;
buildSubset = subset: drv: overrideCabal drv (drv: {
buildTarget = subset;
});
buildSpeedupFlagsMarlowScaling = drv : appendConfigureFlag drv
"--ghc-option=-rtsopts --ghc-option=+RTS --ghc-option=-N${toString threads} --ghc-option=-A128m --ghc-option=-n2m --ghc-option=-qb0 --ghc-option=-qn${toString cores} --ghc-option=-RTS";
in compiler.override {
overrides = self: super: {
# To generate these go to ./pkgs and run ./generate.sh
Expand Down Expand Up @@ -62,7 +69,10 @@ in compiler.override {
# production full nodes shouldn't use wallet as it means different constants
configureFlags = [ "-f-asserts" "-f-dev-mode" "-fwith-explorer"];
});
cardano-sl-static = justStaticExecutables self.cardano-sl;
cardano-sl-static =
buildSpeedupFlagsMarlowScaling
(buildSubset ("cardano-node")
(dontCheck (linkWithGold (justStaticExecutables self.cardano-sl))));
cardano-report-server-static = justStaticExecutables self.cardano-report-server;
cardano-sl-explorer-static = justStaticExecutables self.cardano-sl-explorer;

Expand Down

0 comments on commit b01f36c

Please sign in to comment.