According to the descriptions of #377 and #379, spc now needs to add a series of customizable environment variables to implement custom compilation parameters.
Demand is expected to be as follows:
Customize the environment variables for compiling PHP commands, such as CFLAGS, LDFLAGS, etc.
Customize the environment variables of various libraries, such as ZLIB_CFLAGS, etc.
Customize various compilation commands (if necessary, of course, there is a high probability that it may not be considered)
Possible problems expected in response to demand are as follows:
If you directly use global default variable names such as CFLAGS, consider the interference of the default environment on spc's default CFLAGS.
The prefix of the library name needs to be carefully considered according to the rules, or a table of variable names needs to be maintained in the docs.
It is necessary to intervene in shell()->exec(), or completely use configuration form instead of PHP code function build().
Another biggest problem is different libs use different build tools (cmake, configure or direct cc make), of course they accepts different vars.
I'm not opposed to a lot of modification, but I don't know where the boundaries of customization are. There are many different libraries that can directly insert the variables they need through export before building, and we should probably create a branch to determine which values need to be replaced through environment variables.
According to the descriptions of #377 and #379, spc now needs to add a series of customizable environment variables to implement custom compilation parameters.
Demand is expected to be as follows:
Possible problems expected in response to demand are as follows:
CFLAGS
, consider the interference of the default environment on spc's default CFLAGS.shell()->exec()
, or completely use configuration form instead of PHP codefunction build()
.Another biggest problem is different libs use different build tools (cmake, configure or direct cc make), of course they accepts different vars.
I'm not opposed to a lot of modification, but I don't know where the boundaries of customization are. There are many different libraries that can directly insert the variables they need through
export
before building, and we should probably create a branch to determine which values need to be replaced through environment variables.