Skip to content

generate go_asm.h in an object directory (Internal) #20618

Open
@JettJones

Description

@JettJones

Is your feature request related to a problem? Please describe.
This is an internal friction from tweaking the golang build.

in build_pkg.py in build_go_package - https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/go/util_rules/build_pkg.py#L753

  • go_asm.h can be placed at the root of the working directory, or beside the module, if the module is also in the working directory.

As part of named_cache refactoring, I tried to move go_asm.h into one consistent location {workingdir}/_objdir/go_asm.h - but that change resulted in failures compiling stdlib modules.

Filing this to keep track of the partial investigation.

Describe the solution you'd like
Using an object directory to hold go_asm.h - fixing this for stdlib would require some investigation as to why those modules use a different path for this file. In theory all the paths for compilation are passed by the commands pants generates, but there are no other go_asm.h references to pin this on.

Describe alternatives you've considered
No change would leave go_asm.h at the root of the sandbox. This works, but differs from files generated in cgo.py https://github.com/pantsbuild/pants/blob/main/src/python/pants/backend/go/util_rules/cgo.py#L668

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions