clover: Introduce CLOVER_EXTRA_*_OPTIONS environment variables
authorVedran Miletić <vedran@miletic.net>
Wed, 28 Sep 2016 14:18:24 +0000 (16:18 +0200)
committerFrancisco Jerez <currojerez@riseup.net>
Sun, 30 Oct 2016 19:45:26 +0000 (12:45 -0700)
commit2fba72046da09dd28f54df02794b358773899d13
treedd56e8a50c45608f2cc2e223e6775da11535c18d
parente3272865c216933168e6c08766d266a33d0e1497
clover: Introduce CLOVER_EXTRA_*_OPTIONS environment variables

The options specified in the CLOVER_EXTRA_BUILD_OPTIONS shell
variable are appended to the options specified by the OpenCL program
in the clBuildProgram function call, if any.
Analogously, the options specified in the CLOVER_EXTRA_COMPILE_OPTIONS
and CLOVER_EXTRA_LINK_OPTIONS variables are appended to the options
specified in clCompileProgram and clLinkProgram function calls,
respectively.

v2:
 * rename to CLOVER_EXTRA_COMPILER_OPTIONS
 * use debug_get_option
 * append to linker options as well

v3: code cleanups

v4: separate CLOVER_EXTRA_LINKER_OPTIONS options

v5:
 * fix documentation typo
 * use CLOVER_EXTRA_COMPILER_OPTIONS in link stage

v6:
 * separate in CLOVER_EXTRA_{BUILD,COMPILE,LINK}_OPTIONS
 * append options in cl{Build,Compile,Link}Program

Signed-off-by: Vedran Miletić <vedran@miletic.net>
Reviewed-by[v1]: Edward O'Callaghan <funfunctor@folklore1984.net>

v7 [Francisco Jerez]: Slight simplification.

Reviewed-by: Francisco Jerez <currojerez@riseup.net>
docs/envvars.html
src/gallium/state_trackers/clover/api/program.cpp