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

[Go] use GOOS to distinguish between platforms #50362

Merged
merged 1 commit into from Jul 13, 2021

Conversation

wamuir
Copy link
Contributor

@wamuir wamuir commented Jun 19, 2021

Running go generate within tensorflow/go/op executes tensorflow/go/genop/generate.sh superfluously (twice). This is because tensorflow/go/genop/generate.win.go does not follow golang build contraints which, for file suffixes, require an underscore and the full OS name of windows (e.g., generate_windows.go). Thus, go generate runs tensorflow/go/genop/generate.go and tensorflow/go/genop/generate.win.go on any platform.

It is more direct to remove the build constraint and instead distinguish between platforms within the shell script as go env GOOS provides the platform name. This also allows the script to be called directly with GOOS set as an environment variable.

@google-ml-butler google-ml-butler bot added the size:S CL Change Size: Small label Jun 19, 2021
@google-cla google-cla bot added the cla: yes label Jun 19, 2021
@gbaned gbaned self-assigned this Jun 21, 2021
@gbaned gbaned added this to Assigned Reviewer in PR Queue via automation Jun 21, 2021
@gbaned gbaned requested a review from frankchn June 21, 2021 07:06
@gbaned gbaned added the awaiting review Pull request awaiting review label Jul 2, 2021
@gbaned gbaned requested review from gharibian and removed request for frankchn July 8, 2021 12:20
PR Queue automation moved this from Assigned Reviewer to Approved by Reviewer Jul 9, 2021
@google-ml-butler google-ml-butler bot added kokoro:force-run Tests on submitted change ready to pull PR ready for merge process labels Jul 9, 2021
@kokoro-team kokoro-team removed the kokoro:force-run Tests on submitted change label Jul 9, 2021
@gbaned gbaned added ready to pull PR ready for merge process and removed awaiting review Pull request awaiting review ready to pull PR ready for merge process labels Jul 12, 2021
@copybara-service copybara-service bot merged commit 20897e5 into tensorflow:master Jul 13, 2021
PR Queue automation moved this from Approved by Reviewer to Merged Jul 13, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
cla: yes ready to pull PR ready for merge process size:S CL Change Size: Small
Projects
PR Queue
  
Merged
Development

Successfully merging this pull request may close these issues.

None yet

4 participants