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

Update Makefile to use CGO_ENABLED environment variable #1739

Merged
merged 2 commits into from
Jun 26, 2023

Conversation

sukhil-suresh
Copy link
Contributor

@sukhil-suresh sukhil-suresh commented May 15, 2023

There are scenarios in which CGO_ENABLED=1 has to be set when building the gomplate binary.
Specifically building the binary in FIPS-enabled mode requires that CGO_ENABLED=1 and GOEXPERIMENT=boringcrypto are set.
However, this is not possible with the Makefile hardcoding CGO_ENABLED=0.

This PR makes changes to allow the value of the CGO_ENABLED environment variable to be used if it is set.
If the CGO_ENABLED environment variable is not set, then CGO_ENABLED defaults to 0.

@hairyhenderson
Copy link
Owner

Thanks for the contribution, @sukhil-suresh!

Copy link
Owner

@hairyhenderson hairyhenderson left a comment

Choose a reason for hiding this comment

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

LGTM - just need an explanatory comment (I'll definitely forget why we'd ever want to override it!)

@sukhil-suresh
Copy link
Contributor Author

@hairyhenderson please take another look. I have made the suggested change.

Copy link
Owner

@hairyhenderson hairyhenderson left a comment

Choose a reason for hiding this comment

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

Thanks @sukhil-suresh!

@hairyhenderson hairyhenderson merged commit b27767a into hairyhenderson:main Jun 26, 2023
13 checks passed
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 this pull request may close these issues.

None yet

2 participants