Skip to content
This repository has been archived by the owner on Jan 3, 2024. It is now read-only.

Allow additional Node configure args with PKG_BUILD_CONFIGURE_ARGS #102

Closed
wants to merge 2 commits into from

Conversation

mladkau
Copy link

@mladkau mladkau commented Aug 19, 2020

This PR adds the ability to specify additional build options for the node build via an environment variable.

For example:

export PKG_BUILD_PARAM="--partly-static"
pkg . --build -t node14-linux-x64

This can be used to address: vercel/pkg#555
The added functionality is a bit wider than /pull/72

@jesec jesec force-pushed the feat/build-env-options branch from 2f89928 to be8a184 Compare April 2, 2021 12:11
@jesec jesec changed the title feat: Adding pkg environment variable for additional node build options Allow additional Node configure args with PKG_BUILD_CONFIGURE_ARGS Apr 2, 2021
@jesec
Copy link
Contributor

jesec commented Apr 2, 2021

@mladkau I made some updates: a. rename the env variable to PKG_BUILD_CONFIGURE_ARGS, 2. apply to windows build as well.

@jesec jesec requested review from leerob and robertsLando April 2, 2021 12:13
Copy link
Contributor

@robertsLando robertsLando left a comment

Choose a reason for hiding this comment

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

This needs to be documented in pkg and/or here. Maybe in this section: https://github.com/vercel/pkg#environment (waiting for a pr there before merge)

@jesec
Copy link
Contributor

jesec commented Apr 2, 2021

This needs to be documented in pkg and/or here. Maybe in this section: https://github.com/vercel/pkg#environment (waiting for a pr there before merge)

I lean toward hiding this as an advanced argument.

@robertsLando
Copy link
Contributor

robertsLando commented Apr 2, 2021

I understand it but we should start document more things in both pkg and pkg-fetch projects otherwise it could be hard for new devs to start developing or even users that are looking for those advanced options need to read the code in order to know them

I have spent many time looking at the code of both projects to undestand how they work at low level and some things are still obscure or not 100% clear to me

@jesec jesec force-pushed the feat/build-env-options branch from be8a184 to 9aea2e9 Compare April 11, 2021 14:17
@leerob
Copy link
Member

leerob commented May 24, 2021

Any update here?

@robertsLando
Copy link
Contributor

I think this could land but needs docs...

@jesec
Copy link
Contributor

jesec commented May 24, 2021

This needs to be documented in pkg and/or here. Maybe in this section: https://github.com/vercel/pkg#environment (waiting for a pr there before merge)

I lean toward hiding this as an advanced argument.

^

Documenting it means that we are supposed to support it in some ways, but we can't support every exotic Node configure flag (and combination of) out there. The custom binaries would not be supported by us in any way. As such, I think this should be a hidden undocumented option.

@robertsLando
Copy link
Contributor

@leerob Could we merge this?

@robertsLando
Copy link
Contributor

@jesec

@leerob leerob closed this Jan 3, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants