From 5c91ddbeeffde92b41bb4e2720aaea98d7758ef9 Mon Sep 17 00:00:00 2001 From: Florian Klink Date: Tue, 24 Oct 2023 23:36:18 +0300 Subject: chore(nix/buildGo): bump to go 1.19 Reading from lukegb's tea leaves. Change-Id: I5705fcb3212943e62de6e74cf8460171383121d5 Reviewed-on: https://cl.tvl.fyi/c/depot/+/9796 Autosubmit: flokli Reviewed-by: Connor Brewster Tested-by: BuildkiteCI --- nix/buildGo/default.nix | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) (limited to 'nix') diff --git a/nix/buildGo/default.nix b/nix/buildGo/default.nix index bd2e323300..a7b1f6771e 100644 --- a/nix/buildGo/default.nix +++ b/nix/buildGo/default.nix @@ -24,8 +24,8 @@ let inherit (pkgs) lib runCommand fetchFromGitHub protobuf symlinkJoin; - # TODO: Adapt to Go 1.19 changes - go = pkgs.go_1_18; + # TODO: Adapt to Go 1.20 changes + go = pkgs.go_1_19; # Helpers for low-level Go compiler invocations spaceOut = lib.concatStringsSep " "; @@ -59,7 +59,7 @@ let program = { name, srcs, deps ? [ ], x_defs ? { } }: let uniqueDeps = allDeps (map (d: d.gopkg) deps); in runCommand name { } '' - ${go}/bin/go tool compile -o ${name}.a -trimpath=$PWD -trimpath=${go} ${includeSources uniqueDeps} ${spaceOut srcs} + ${go}/bin/go tool compile -o ${name}.a -trimpath=$PWD -trimpath=${go} -p main ${includeSources uniqueDeps} ${spaceOut srcs} mkdir -p $out/bin export GOROOT_FINAL=go ${go}/bin/go tool link -o $out/bin/${name} -buildid nix ${xFlags x_defs} ${includeLibs uniqueDeps} ${name}.a @@ -79,8 +79,8 @@ let # This is required for several popular packages (e.g. x/sys). ifAsm = do: lib.optionalString (sfiles != [ ]) do; asmBuild = ifAsm '' - ${go}/bin/go tool asm -trimpath $PWD -I $PWD -I ${go}/share/go/pkg/include -D GOOS_linux -D GOARCH_amd64 -gensymabis -o ./symabis ${spaceOut sfiles} - ${go}/bin/go tool asm -trimpath $PWD -I $PWD -I ${go}/share/go/pkg/include -D GOOS_linux -D GOARCH_amd64 -o ./asm.o ${spaceOut sfiles} + ${go}/bin/go tool asm -p ${path} -trimpath $PWD -I $PWD -I ${go}/share/go/pkg/include -D GOOS_linux -D GOARCH_amd64 -gensymabis -o ./symabis ${spaceOut sfiles} + ${go}/bin/go tool asm -p ${path} -trimpath $PWD -I $PWD -I ${go}/share/go/pkg/include -D GOOS_linux -D GOARCH_amd64 -o ./asm.o ${spaceOut sfiles} ''; asmLink = ifAsm "-symabis ./symabis -asmhdr $out/go_asm.h"; asmPack = ifAsm '' -- cgit 1.4.1