3p: pass -p to go tool asm to for go1.19
This commit is contained in:
parent
2f0b9369fe
commit
7f00c40155
2 changed files with 4 additions and 4 deletions
2
third_party/default.nix
vendored
2
third_party/default.nix
vendored
|
@ -54,7 +54,7 @@ rec {
|
||||||
nixos = import ./nixpkgs/nixos;
|
nixos = import ./nixpkgs/nixos;
|
||||||
nixeval = import ./nixpkgs/nixos/lib/eval-config.nix;
|
nixeval = import ./nixpkgs/nixos/lib/eval-config.nix;
|
||||||
buildGo =
|
buildGo =
|
||||||
let orig = import ./tvl/nix/buildGo { pkgs = (nixpkgs // { go = nixpkgs.go_1_18; }); inherit gopkgs; };
|
let orig = import ./tvl/nix/buildGo { pkgs = nixpkgs; inherit gopkgs; };
|
||||||
in orig // {
|
in orig // {
|
||||||
program = { dockerData ? [], ... }@args:
|
program = { dockerData ? [], ... }@args:
|
||||||
let
|
let
|
||||||
|
|
6
third_party/tvl/nix/buildGo/default.nix
vendored
6
third_party/tvl/nix/buildGo/default.nix
vendored
|
@ -68,7 +68,7 @@ let
|
||||||
in runCommand name {
|
in runCommand name {
|
||||||
buildInputs = cgoBuildInputs;
|
buildInputs = cgoBuildInputs;
|
||||||
} ''
|
} ''
|
||||||
${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
|
mkdir -p $out/bin
|
||||||
export GOROOT_FINAL=go
|
export GOROOT_FINAL=go
|
||||||
${go}/bin/go tool link -o $out/bin/${name} -buildid nix \
|
${go}/bin/go tool link -o $out/bin/${name} -buildid nix \
|
||||||
|
@ -107,8 +107,8 @@ let
|
||||||
# This is required for several popular packages (e.g. x/sys).
|
# This is required for several popular packages (e.g. x/sys).
|
||||||
ifAsm = do: lib.optionalString (sfiles != [ ]) do;
|
ifAsm = do: lib.optionalString (sfiles != [ ]) do;
|
||||||
asmBuild = ifAsm ''
|
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 -p ${path} -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 -trimpath $PWD -I $PWD -I ${go}/share/go/pkg/include -D GOOS_linux -D GOARCH_amd64 -p ${path} -o ./asm.o ${spaceOut sfiles}
|
||||||
'';
|
'';
|
||||||
asmLink = ifAsm "-symabis ./symabis -asmhdr $out/go_asm.h";
|
asmLink = ifAsm "-symabis ./symabis -asmhdr $out/go_asm.h";
|
||||||
asmPack = ifAsm ''
|
asmPack = ifAsm ''
|
||||||
|
|
Loading…
Reference in a new issue