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

Define GOOS_<goos> and GOARCH_<goarch> for assembly #1894

Closed
jayconrod opened this issue Jan 9, 2019 · 1 comment · Fixed by #3528
Closed

Define GOOS_<goos> and GOARCH_<goarch> for assembly #1894

jayconrod opened this issue Jan 9, 2019 · 1 comment · Fixed by #3528
Labels

Comments

@jayconrod
Copy link
Contributor

go build does this. We should, too.

Example:

/opt/go1.12beta1/pkg/tool/linux_amd64/asm -trimpath $WORK/b001 -I $WORK/b001/ -I /opt/go1.12beta1/pkg/include -D GOOS_linux -D GOARCH_amd64 -o $WORK/b001/foo.o ./foo.s
@eugene-dounar
Copy link

eugene-dounar commented Sep 29, 2020

Cannot build https://github.com/thrift-iterator/go due to this limitation. On of it's dependencies (https://github.com/v2pro/plz) relies on GOARCH_<goarch>

patrickmscott pushed a commit to patrickmscott/rules_go that referenced this issue Apr 11, 2023
Fixes bazelbuild#1894 by adding GOOS_
GOARCH_ and GOOS_GOARCH_ defines for building assembly.
patrickmscott pushed a commit to patrickmscott/rules_go that referenced this issue Apr 11, 2023
Fixes bazelbuild#1894 by adding GOOS_
GOARCH_ and GOOS_GOARCH_ defines for building assembly.
fmeum pushed a commit to patrickmscott/rules_go that referenced this issue Apr 13, 2023
Fixes bazelbuild#1894 by adding GOOS_
GOARCH_ and GOOS_GOARCH_ defines for building assembly.
fmeum pushed a commit that referenced this issue Apr 13, 2023
* Add defines for assembly build

Fixes #1894 by adding GOOS_
GOARCH_ and GOOS_GOARCH_ defines for building assembly.

* Return a copy of args

* Use build.Default variables for os and arch

Add a compilation test that uses another architecture with conditional
inclusion of an assembly function. This mimics a real library that fails
to build under rules_go.

---------

Co-authored-by: Patrick Scott <patrick.scott@observeinc.com>
linzhp pushed a commit that referenced this issue Apr 20, 2023
* Add defines for assembly build

Fixes #1894 by adding GOOS_
GOARCH_ and GOOS_GOARCH_ defines for building assembly.

* Return a copy of args

* Use build.Default variables for os and arch

Add a compilation test that uses another architecture with conditional
inclusion of an assembly function. This mimics a real library that fails
to build under rules_go.

---------

Co-authored-by: Patrick Scott <patrick.scott@observeinc.com>
tingilee pushed a commit to tingilee/rules_go that referenced this issue Jul 19, 2023
* Add defines for assembly build

Fixes bazelbuild#1894 by adding GOOS_
GOARCH_ and GOOS_GOARCH_ defines for building assembly.

* Return a copy of args

* Use build.Default variables for os and arch

Add a compilation test that uses another architecture with conditional
inclusion of an assembly function. This mimics a real library that fails
to build under rules_go.

---------

Co-authored-by: Patrick Scott <patrick.scott@observeinc.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants