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

Restructure go Makefile: Build the per-platform target. #14718

Merged
merged 1 commit into from Nov 8, 2023
Merged

Conversation

criemen
Copy link
Collaborator

@criemen criemen commented Nov 7, 2023

This changes the default build target we use to build the go extractor to use the per-platform targets (requires internal change to follow up). This also builds the macos target as universal binary.

This changes the default build target we use to build the go extractor
to use th per-platform targets (requires internal change to follow up).
This also builds the macos target as universal binary.
@criemen criemen added the depends on internal PR This PR should only be merged in sync with an internal Semmle PR label Nov 7, 2023
@github-actions github-actions bot added the Go label Nov 7, 2023
@criemen criemen marked this pull request as ready for review November 7, 2023 19:27
@criemen criemen requested a review from a team as a code owner November 7, 2023 19:27
Comment on lines +72 to +73
lipo -create $@.amd64 $@.arm64 -output $@
rm $@.amd64 $@.arm64
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
lipo -create $@.amd64 $@.arm64 -output $@
rm $@.amd64 $@.arm64
lipo -create ../$@.amd64 ../$@.arm64 -output ../$@
rm ../$@.amd64 ../$@.arm64

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My understanding is that go -C extractor changes the working directory (hence the ../), but lipo and rm run one level up (as compared to the go working directory), and that's why the ../ is not needed here.
Indeed, you can see the build produces a working distribution on the internal PR.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh yeah, never mind

@criemen criemen merged commit 512c6a5 into main Nov 8, 2023
9 of 12 checks passed
@criemen criemen deleted the criemen/go-ub branch November 8, 2023 14:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
depends on internal PR This PR should only be merged in sync with an internal Semmle PR Go
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants