mirror of
https://github.com/odin-lang/Odin.git
synced 2026-04-19 13:00:28 +00:00
Make corrections
This commit is contained in:
@@ -66,10 +66,7 @@ set linker_settings=%libs% %linker_flags%
|
||||
del *.pdb > NUL 2> NUL
|
||||
del *.ilk > NUL 2> NUL
|
||||
|
||||
rem cl %compiler_settings% "src\main.cpp" /link %linker_settings% -OUT:%exe_name%
|
||||
|
||||
cl %compiler_settings% "src\main.cpp" /link %linker_settings% -OUT:%exe_name% ^
|
||||
&& odin run examples/demo
|
||||
cl %compiler_settings% "src\main.cpp" /link %linker_settings% -OUT:%exe_name%
|
||||
|
||||
if %errorlevel% neq 0 goto end_of_build
|
||||
if %release_mode% EQU 0 odin run examples/demo/demo.odin
|
||||
|
||||
@@ -72,7 +72,7 @@ TargetEndianKind target_endians[TargetArch_COUNT] = {
|
||||
};
|
||||
|
||||
#ifndef ODIN_VERSION_RAW
|
||||
#define ODIN_VERSION_RAW "dev-2021-unknown"
|
||||
#define ODIN_VERSION_RAW "dev-unknown-unknown"
|
||||
#endif
|
||||
|
||||
String const ODIN_VERSION = str_lit(ODIN_VERSION_RAW);
|
||||
|
||||
33
src/main.cpp
33
src/main.cpp
@@ -2183,44 +2183,11 @@ int main(int arg_count, char const **arg_ptr) {
|
||||
|
||||
remove_temp_files(gen.output_base);
|
||||
|
||||
#if defined(GB_COMPILER_MSVC)
|
||||
if (false) {
|
||||
PROCESS_MEMORY_COUNTERS_EX pmc = {};
|
||||
GetProcessMemoryInfo(GetCurrentProcess(), (PROCESS_MEMORY_COUNTERS*)&pmc, sizeof(pmc));
|
||||
SIZE_T virtual_mem_used_by_me = pmc.PrivateUsage;
|
||||
gb_printf_err("virtual_memory_used: %tu B\n", virtual_mem_used_by_me);
|
||||
|
||||
Parser *p = checker.parser;
|
||||
isize lines = p->total_line_count;
|
||||
isize tokens = p->total_token_count;
|
||||
isize files = 0;
|
||||
isize packages = p->packages.count;
|
||||
isize total_file_size = 0;
|
||||
for_array(i, p->packages) {
|
||||
files += p->packages[i]->files.count;
|
||||
for_array(j, p->packages[i]->files) {
|
||||
AstFile *file = p->packages[i]->files[j];
|
||||
total_file_size += file->tokenizer.end - file->tokenizer.start;
|
||||
}
|
||||
}
|
||||
gb_printf_err("total_file_size: %lld B\n", total_file_size);
|
||||
gb_printf_err("lines: %lld\n", lines);
|
||||
gb_printf_err("files: %lld\n", files);
|
||||
gb_printf_err("tokens: %lld\n", tokens);
|
||||
gb_printf_err("packages: %lld\n", packages);
|
||||
}
|
||||
#endif
|
||||
|
||||
if (run_output) {
|
||||
#if defined(GB_SYSTEM_WINDOWS)
|
||||
return system_exec_command_line_app("odin run", "%.*s.exe %.*s", LIT(gen.output_base), LIT(run_args_string));
|
||||
#else
|
||||
//NOTE(thebirk): This whole thing is a little leaky
|
||||
String output_ext = {};
|
||||
String complete_path = concatenate_strings(heap_allocator(), gen.output_base, output_ext);
|
||||
complete_path = path_to_full_path(heap_allocator(), complete_path);
|
||||
return system_exec_command_line_app("odin run", "\"%.*s\" %.*s", LIT(complete_path), LIT(run_args_string));
|
||||
#endif
|
||||
}
|
||||
|
||||
return 0;
|
||||
|
||||
Reference in New Issue
Block a user