Lines Matching refs:kbuild_dir
33 .kbuild_dir = NULL,
51 llvm_param.kbuild_dir = strdup(value); in perf_llvm_config()
227 static int detect_kbuild_dir(char **kbuild_dir) in detect_kbuild_dir() argument
229 const char *test_dir = llvm_param.kbuild_dir; in detect_kbuild_dir()
259 err = asprintf(kbuild_dir, "%s%s%s", prefix_dir, test_dir, in detect_kbuild_dir()
295 void llvm__get_kbuild_opts(char **kbuild_dir, char **kbuild_include_opts) in llvm__get_kbuild_opts() argument
301 if (!kbuild_dir || !kbuild_include_opts) in llvm__get_kbuild_opts()
304 *kbuild_dir = NULL; in llvm__get_kbuild_opts()
309 *kbuild_dir = strdup(saved_kbuild_dir); in llvm__get_kbuild_opts()
312 if (*kbuild_dir && *kbuild_include_opts) in llvm__get_kbuild_opts()
315 zfree(kbuild_dir); in llvm__get_kbuild_opts()
325 if (llvm_param.kbuild_dir && !llvm_param.kbuild_dir[0]) { in llvm__get_kbuild_opts()
331 err = detect_kbuild_dir(kbuild_dir); in llvm__get_kbuild_opts()
341 pr_debug("Kernel build dir is set to %s\n", *kbuild_dir); in llvm__get_kbuild_opts()
342 force_set_env("KBUILD_DIR", *kbuild_dir); in llvm__get_kbuild_opts()
353 *kbuild_dir); in llvm__get_kbuild_opts()
355 free(*kbuild_dir); in llvm__get_kbuild_opts()
356 *kbuild_dir = NULL; in llvm__get_kbuild_opts()
362 saved_kbuild_dir = strdup(*kbuild_dir); in llvm__get_kbuild_opts()
439 char *kbuild_dir = NULL, *kbuild_include_opts = NULL, in llvm__compile_bpf() local
472 llvm__get_kbuild_opts(&kbuild_dir, &kbuild_include_opts); in llvm__compile_bpf()
491 force_set_env("WORKING_DIR", kbuild_dir ? : "."); in llvm__compile_bpf()
544 free(kbuild_dir); in llvm__compile_bpf()
559 free(kbuild_dir); in llvm__compile_bpf()