Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Remove asm -compiling-runtime flag for go 1.22+ compatible versions #20554

Merged
merged 2 commits into from
Feb 16, 2024

Conversation

FilipNikolovski
Copy link
Contributor

When using go 1.22, trying to compile a go package using pants fails with:

13:07:42.25 [INFO] Initialization options changed: reinitializing scheduler...
13:07:46.62 [INFO] Scheduler initialized.
13:07:51.89 [ERROR] Completed: Compile with Go - runtime/internal/syscall - runtime/internal/syscall failed (exit code 1).
flag provided but not defined: -compiling-runtime
usage: asm [options] file.s ...
Flags:
  -D value
        predefined symbol with optional simple value -D=identifier=value; can be set multiple times
  -I value
        include directory; can be set multiple times
  -S    print assembly and machine code
  -V    print version and exit
  -d value
        enable debugging settings; try -d help
  -debug
        dump instructions as they are parsed
  -dynlink
        support references to Go symbols defined in other shared libraries
  -e    no limit on number of errors reported
  -gensymabis
        write symbol ABI information to output file, don't assemble
  -linkshared
        generate code that will be linked against Go shared libraries
  -o string
        output file; default foo.o for /a/b/c/foo.s as first argument
  -p string
        set expected package import to path (default "<unlinkable>")
  -shared
        generate code that can be linked into a shared library
  -spectre list
        enable spectre mitigations in list (all, ret)
  -trimpath string
        remove prefix from recorded source file paths
  -v    print debug output

This flag has been removed from version 1.22 - asm can now make the determination itself regarding whether or not we're compiling a runtime package, so there's no need to pass that flag anymore.

See: https://cs.opensource.google/go/go/+/72946ae8674a295e7485982fe57c65c7142b2c14

@tgolsson tgolsson added backend: Go Go backend-related issues category:bugfix Bug fixes for released features labels Feb 16, 2024
@kaos kaos requested a review from tdyas February 16, 2024 15:35
@tdyas tdyas modified the milestones: 2.20.x, 2.19.x Feb 16, 2024
@tdyas tdyas modified the milestones: 2.19.x, 2.18.x Feb 16, 2024
@benjyw
Copy link
Contributor

benjyw commented Feb 16, 2024

Thanks @FilipNikolovski !

@benjyw benjyw merged commit cc33747 into pantsbuild:main Feb 16, 2024
24 checks passed
WorkerPants pushed a commit that referenced this pull request Feb 16, 2024
…20554)

When using go 1.22, trying to compile a go package using pants fails
with:

```
13:07:42.25 [INFO] Initialization options changed: reinitializing scheduler...
13:07:46.62 [INFO] Scheduler initialized.
13:07:51.89 [ERROR] Completed: Compile with Go - runtime/internal/syscall - runtime/internal/syscall failed (exit code 1).
flag provided but not defined: -compiling-runtime
usage: asm [options] file.s ...
Flags:
  -D value
        predefined symbol with optional simple value -D=identifier=value; can be set multiple times
  -I value
        include directory; can be set multiple times
  -S    print assembly and machine code
  -V    print version and exit
  -d value
        enable debugging settings; try -d help
  -debug
        dump instructions as they are parsed
  -dynlink
        support references to Go symbols defined in other shared libraries
  -e    no limit on number of errors reported
  -gensymabis
        write symbol ABI information to output file, don't assemble
  -linkshared
        generate code that will be linked against Go shared libraries
  -o string
        output file; default foo.o for /a/b/c/foo.s as first argument
  -p string
        set expected package import to path (default "<unlinkable>")
  -shared
        generate code that can be linked into a shared library
  -spectre list
        enable spectre mitigations in list (all, ret)
  -trimpath string
        remove prefix from recorded source file paths
  -v    print debug output
```

This flag has been removed from version 1.22 - asm can now make the
determination itself regarding whether or not we're compiling a
`runtime` package, so there's no need to pass that flag anymore.

See:
https://cs.opensource.google/go/go/+/72946ae8674a295e7485982fe57c65c7142b2c14
WorkerPants pushed a commit that referenced this pull request Feb 16, 2024
…20554)

When using go 1.22, trying to compile a go package using pants fails
with:

```
13:07:42.25 [INFO] Initialization options changed: reinitializing scheduler...
13:07:46.62 [INFO] Scheduler initialized.
13:07:51.89 [ERROR] Completed: Compile with Go - runtime/internal/syscall - runtime/internal/syscall failed (exit code 1).
flag provided but not defined: -compiling-runtime
usage: asm [options] file.s ...
Flags:
  -D value
        predefined symbol with optional simple value -D=identifier=value; can be set multiple times
  -I value
        include directory; can be set multiple times
  -S    print assembly and machine code
  -V    print version and exit
  -d value
        enable debugging settings; try -d help
  -debug
        dump instructions as they are parsed
  -dynlink
        support references to Go symbols defined in other shared libraries
  -e    no limit on number of errors reported
  -gensymabis
        write symbol ABI information to output file, don't assemble
  -linkshared
        generate code that will be linked against Go shared libraries
  -o string
        output file; default foo.o for /a/b/c/foo.s as first argument
  -p string
        set expected package import to path (default "<unlinkable>")
  -shared
        generate code that can be linked into a shared library
  -spectre list
        enable spectre mitigations in list (all, ret)
  -trimpath string
        remove prefix from recorded source file paths
  -v    print debug output
```

This flag has been removed from version 1.22 - asm can now make the
determination itself regarding whether or not we're compiling a
`runtime` package, so there's no need to pass that flag anymore.

See:
https://cs.opensource.google/go/go/+/72946ae8674a295e7485982fe57c65c7142b2c14
WorkerPants pushed a commit that referenced this pull request Feb 16, 2024
…20554)

When using go 1.22, trying to compile a go package using pants fails
with:

```
13:07:42.25 [INFO] Initialization options changed: reinitializing scheduler...
13:07:46.62 [INFO] Scheduler initialized.
13:07:51.89 [ERROR] Completed: Compile with Go - runtime/internal/syscall - runtime/internal/syscall failed (exit code 1).
flag provided but not defined: -compiling-runtime
usage: asm [options] file.s ...
Flags:
  -D value
        predefined symbol with optional simple value -D=identifier=value; can be set multiple times
  -I value
        include directory; can be set multiple times
  -S    print assembly and machine code
  -V    print version and exit
  -d value
        enable debugging settings; try -d help
  -debug
        dump instructions as they are parsed
  -dynlink
        support references to Go symbols defined in other shared libraries
  -e    no limit on number of errors reported
  -gensymabis
        write symbol ABI information to output file, don't assemble
  -linkshared
        generate code that will be linked against Go shared libraries
  -o string
        output file; default foo.o for /a/b/c/foo.s as first argument
  -p string
        set expected package import to path (default "<unlinkable>")
  -shared
        generate code that can be linked into a shared library
  -spectre list
        enable spectre mitigations in list (all, ret)
  -trimpath string
        remove prefix from recorded source file paths
  -v    print debug output
```

This flag has been removed from version 1.22 - asm can now make the
determination itself regarding whether or not we're compiling a
`runtime` package, so there's no need to pass that flag anymore.

See:
https://cs.opensource.google/go/go/+/72946ae8674a295e7485982fe57c65c7142b2c14
@WorkerPants
Copy link
Member

I tried to automatically cherry-pick this change back to each relevant milestone, so that it is available in those older releases of Pants.

✔️ 2.18.x

Successfully opened #20563.

✔️ 2.19.x

Successfully opened #20561.

✔️ 2.20.x

Successfully opened #20562.


Thanks again for your contributions!

🤖 Beep Boop here's my run link

tdyas pushed a commit that referenced this pull request Feb 17, 2024
…Cherry-pick of #20554) (#20562)

When using go 1.22, trying to compile a go package using pants fails
with:

```
13:07:42.25 [INFO] Initialization options changed: reinitializing scheduler...
13:07:46.62 [INFO] Scheduler initialized.
13:07:51.89 [ERROR] Completed: Compile with Go - runtime/internal/syscall - runtime/internal/syscall failed (exit code 1).
flag provided but not defined: -compiling-runtime
usage: asm [options] file.s ...
Flags:
  -D value
        predefined symbol with optional simple value -D=identifier=value; can be set multiple times
  -I value
        include directory; can be set multiple times
  -S    print assembly and machine code
  -V    print version and exit
  -d value
        enable debugging settings; try -d help
  -debug
        dump instructions as they are parsed
  -dynlink
        support references to Go symbols defined in other shared libraries
  -e    no limit on number of errors reported
  -gensymabis
        write symbol ABI information to output file, don't assemble
  -linkshared
        generate code that will be linked against Go shared libraries
  -o string
        output file; default foo.o for /a/b/c/foo.s as first argument
  -p string
        set expected package import to path (default "<unlinkable>")
  -shared
        generate code that can be linked into a shared library
  -spectre list
        enable spectre mitigations in list (all, ret)
  -trimpath string
        remove prefix from recorded source file paths
  -v    print debug output
```

This flag has been removed from version 1.22 - asm can now make the
determination itself regarding whether or not we're compiling a
`runtime` package, so there's no need to pass that flag anymore.

See:
https://cs.opensource.google/go/go/+/72946ae8674a295e7485982fe57c65c7142b2c14

Co-authored-by: Filip Nikolovski <[email protected]>
tdyas pushed a commit that referenced this pull request Feb 17, 2024
…Cherry-pick of #20554) (#20563)

When using go 1.22, trying to compile a go package using pants fails
with:

```
13:07:42.25 [INFO] Initialization options changed: reinitializing scheduler...
13:07:46.62 [INFO] Scheduler initialized.
13:07:51.89 [ERROR] Completed: Compile with Go - runtime/internal/syscall - runtime/internal/syscall failed (exit code 1).
flag provided but not defined: -compiling-runtime
usage: asm [options] file.s ...
Flags:
  -D value
        predefined symbol with optional simple value -D=identifier=value; can be set multiple times
  -I value
        include directory; can be set multiple times
  -S    print assembly and machine code
  -V    print version and exit
  -d value
        enable debugging settings; try -d help
  -debug
        dump instructions as they are parsed
  -dynlink
        support references to Go symbols defined in other shared libraries
  -e    no limit on number of errors reported
  -gensymabis
        write symbol ABI information to output file, don't assemble
  -linkshared
        generate code that will be linked against Go shared libraries
  -o string
        output file; default foo.o for /a/b/c/foo.s as first argument
  -p string
        set expected package import to path (default "<unlinkable>")
  -shared
        generate code that can be linked into a shared library
  -spectre list
        enable spectre mitigations in list (all, ret)
  -trimpath string
        remove prefix from recorded source file paths
  -v    print debug output
```

This flag has been removed from version 1.22 - asm can now make the
determination itself regarding whether or not we're compiling a
`runtime` package, so there's no need to pass that flag anymore.

See:
https://cs.opensource.google/go/go/+/72946ae8674a295e7485982fe57c65c7142b2c14

Co-authored-by: Filip Nikolovski <[email protected]>
tdyas pushed a commit that referenced this pull request Feb 17, 2024
…Cherry-pick of #20554) (#20561)

When using go 1.22, trying to compile a go package using pants fails
with:

```
13:07:42.25 [INFO] Initialization options changed: reinitializing scheduler...
13:07:46.62 [INFO] Scheduler initialized.
13:07:51.89 [ERROR] Completed: Compile with Go - runtime/internal/syscall - runtime/internal/syscall failed (exit code 1).
flag provided but not defined: -compiling-runtime
usage: asm [options] file.s ...
Flags:
  -D value
        predefined symbol with optional simple value -D=identifier=value; can be set multiple times
  -I value
        include directory; can be set multiple times
  -S    print assembly and machine code
  -V    print version and exit
  -d value
        enable debugging settings; try -d help
  -debug
        dump instructions as they are parsed
  -dynlink
        support references to Go symbols defined in other shared libraries
  -e    no limit on number of errors reported
  -gensymabis
        write symbol ABI information to output file, don't assemble
  -linkshared
        generate code that will be linked against Go shared libraries
  -o string
        output file; default foo.o for /a/b/c/foo.s as first argument
  -p string
        set expected package import to path (default "<unlinkable>")
  -shared
        generate code that can be linked into a shared library
  -spectre list
        enable spectre mitigations in list (all, ret)
  -trimpath string
        remove prefix from recorded source file paths
  -v    print debug output
```

This flag has been removed from version 1.22 - asm can now make the
determination itself regarding whether or not we're compiling a
`runtime` package, so there's no need to pass that flag anymore.

See:
https://cs.opensource.google/go/go/+/72946ae8674a295e7485982fe57c65c7142b2c14

Co-authored-by: Filip Nikolovski <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backend: Go Go backend-related issues category:bugfix Bug fixes for released features
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants