| 361 | } |
| 362 | |
| 363 | void common_init() { |
| 364 | #if defined(_WIN32) |
| 365 | SetConsoleOutputCP(CP_UTF8); |
| 366 | SetConsoleCP(CP_UTF8); |
| 367 | #endif |
| 368 | |
| 369 | llama_log_set(common_log_default_callback, NULL); |
| 370 | |
| 371 | #ifdef NDEBUG |
| 372 | const char * build_type = ""; |
| 373 | #else |
| 374 | const char * build_type = " (debug)"; |
| 375 | #endif |
| 376 | |
| 377 | LOG_DBG("build: %d (%s) with %s for %s%s\n", llama_build_number(), llama_commit(), llama_compiler(), llama_build_target(), build_type); |
| 378 | } |
| 379 | |
| 380 | std::string common_params_get_system_info(const common_params & params) { |
| 381 | std::ostringstream os; |