See src/mesa/state_tracker/st_debug.c for other options.
</ul>
+<h3>Clover state tracker environment variables</h3>
+
+<ul>
+<li>CLOVER_EXTRA_BUILD_OPTIONS - allows specifying additional compiler and linker
+ options. Specified options are appended after the options set by the OpenCL
+ program in clBuildProgram.
+<li>CLOVER_EXTRA_COMPILE_OPTIONS - allows specifying additional compiler
+ options. Specified options are appended after the options set by the OpenCL
+ program in clCompileProgram.
+<li>CLOVER_EXTRA_LINK_OPTIONS - allows specifying additional linker
+ options. Specified options are appended after the options set by the OpenCL
+ program in clLinkProgram.
+</ul>
+
+
<h3>Softpipe driver environment variables</h3>
<ul>
<li>SOFTPIPE_DUMP_FS - if set, the softpipe driver will print fragment shaders
#include "api/util.hpp"
#include "core/program.hpp"
+#include "util/u_debug.h"
#include <sstream>
auto &prog = obj(d_prog);
auto devs = (d_devs ? objs(d_devs, num_devs) :
ref_vector<device>(prog.context().devices()));
- auto opts = (p_opts ? p_opts : "");
+ const auto opts = std::string(p_opts ? p_opts : "") + " " +
+ debug_get_option("CLOVER_EXTRA_BUILD_OPTIONS", "");
validate_build_common(prog, num_devs, d_devs, pfn_notify, user_data);
auto &prog = obj(d_prog);
auto devs = (d_devs ? objs(d_devs, num_devs) :
ref_vector<device>(prog.context().devices()));
- auto opts = (p_opts ? p_opts : "");
+ const auto opts = std::string(p_opts ? p_opts : "") + " " +
+ debug_get_option("CLOVER_EXTRA_COMPILE_OPTIONS", "");
header_map headers;
validate_build_common(prog, num_devs, d_devs, pfn_notify, user_data);
void (*pfn_notify) (cl_program, void *), void *user_data,
cl_int *r_errcode) try {
auto &ctx = obj(d_ctx);
- auto opts = (p_opts ? p_opts : "");
+ const auto opts = std::string(p_opts ? p_opts : "") + " " +
+ debug_get_option("CLOVER_EXTRA_LINK_OPTIONS", "");
auto progs = objs(d_progs, num_progs);
auto prog = create<program>(ctx);
auto devs = validate_link_devices(progs,