1
0
mirror of https://github.com/hashcat/hashcat.git synced 2024-12-23 23:19:09 +00:00

Merge pull request #256 from philsmd/pr-cl-debug-buildlog

show build log whenever 'make DEBUG > 0' is set
This commit is contained in:
Jens Steube 2016-03-06 14:30:18 +01:00
commit 4709550a57

View File

@ -13818,6 +13818,25 @@ int main (int argc, char **argv)
int rc = hc_clBuildProgram (data.ocl, device_param->program, 1, &device_param->device, build_opts, NULL, NULL, false);
#ifdef DEBUG
size_t build_log_size = 0;
hc_clGetProgramBuildInfo (data.ocl, device_param->program, device_param->device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size);
if (build_log_size > 1)
{
char *build_log = (char *) malloc (build_log_size + 1);
memset (build_log, 0, build_log_size + 1);
hc_clGetProgramBuildInfo (data.ocl, device_param->program, device_param->device, CL_PROGRAM_BUILD_LOG, build_log_size, build_log, NULL);
puts (build_log);
free (build_log);
}
#endif
if (rc != 0)
{
device_param->skipped = true;
@ -13873,6 +13892,25 @@ int main (int argc, char **argv)
int rc = hc_clBuildProgram (data.ocl, device_param->program, 1, &device_param->device, build_opts_update, NULL, NULL, false);
#ifdef DEBUG
size_t build_log_size = 0;
hc_clGetProgramBuildInfo (data.ocl, device_param->program, device_param->device, CL_PROGRAM_BUILD_LOG, 0, NULL, &build_log_size);
if (build_log_size > 1)
{
char *build_log = (char *) malloc (build_log_size + 1);
memset (build_log, 0, build_log_size + 1);
hc_clGetProgramBuildInfo (data.ocl, device_param->program, device_param->device, CL_PROGRAM_BUILD_LOG, build_log_size, build_log, NULL);
puts (build_log);
free (build_log);
}
#endif
if (rc != 0)
{
device_param->skipped = true;