the kernellib_name (and corresponding llvm_cpu) can be overridden
to a target with a subset of the features supported by the current cpu
this will allow running e.g. code generation and tests for sse2 (but no
newer features) on a modern cpu
Gbp-Pq: Name 0039-allow-overriding-kernellib_name-for-distro-builds-wi.patch
return NULL;
}
+ const char *custom = pocl_get_string_option("POCL_KERNELLIB_NAME", NULL);
+
const kernellib_features *best_match = NULL;
for (const kernellib_features *kf = kernellib_feature_map; kf->kernellib_name;
++kf) {
matches &= Features[*f];
if (matches) {
best_match = kf;
+ if (custom && !strcmp(custom, kf->kernellib_name))
+ break;
}
}