Commit d5551849 authored by phaer's avatar phaer Committed by phaer
Browse files

go-toml: drop erroneous allowGoReference

allowGoReference was added in 5a69b0b3 (2024-04-29) with the
comment 'allowGoReference adds the flag -trimpath'.  This is
backwards: allowGoReference = true *disables* -trimpath and *allows*
the Go compiler to remain in the runtime closure (257 MiB).

The package builds and passes all tests without it.  Dropping it
re-enables -trimpath and shrinks the runtime closure from 263.6 MiB
to 8.6 MiB.
parent 32c7a5e0
Loading
Loading
Loading
Loading
+0 −4
Original line number Diff line number Diff line
@@ -25,10 +25,6 @@ buildGoModule {
    "cmd/tomltestgen"
  ];

  # allowGoReference adds the flag `-trimpath` which is also denoted by, go-toml's goreleaser config
  #  <https://github.com/pelletier/go-toml/blob/a3d5a0bb530b5206c728eed9cb57323061922bcb/.goreleaser.yaml#L13>
  allowGoReference = true;

  ldflags = [
    "-s"
    "-w"