Browse Source

Remove timing for llvm-opt

gingerBill 7 years ago
parent
commit
4e90644527
3 changed files with 11 additions and 4 deletions
  1. 4 1
      build.bat
  2. 6 2
      examples/demo.odin
  3. 1 1
      src/main.cpp

+ 4 - 1
build.bat

@@ -41,9 +41,12 @@ set linker_settings=%libs% %linker_flags%
 del *.pdb > NUL 2> NUL
 del *.ilk > NUL 2> NUL
 
+rem odin run examples/node-lang/node-lang.odin && goto end_of_build
+
+
 cl %compiler_settings% "src\main.cpp" ^
 	/link %linker_settings% -OUT:%exe_name% ^
-	&& odin run examples/demo.odin -opt=0
+	&& odin build examples/demo.odin -show-timings
 	rem && odin docs core/fmt.odin
 
 del *.obj > NUL 2> NUL

+ 6 - 2
examples/demo.odin

@@ -665,15 +665,19 @@ named_proc_parameters :: proc() {
 }
 
 main :: proc() {
+	Foo :: union {
+
+	}
+
+	when false {
 		general_stuff();
 		default_struct_values();
-	when false {
 		union_type();
 		parametric_polymorphism();
 		threading_example();
 		array_programming();
-	}
 		using_in();
 		named_proc_parameters();
+	}
 }
 

+ 1 - 1
src/main.cpp

@@ -711,7 +711,6 @@ int main(int arg_count, char **arg_ptr) {
 	timings_start_section(&timings, str_lit("llvm ir print"));
 	print_llvm_ir(&ir_gen);
 
-	timings_start_section(&timings, str_lit("llvm-opt"));
 
 	String output_name = ir_gen.output_name;
 	String output_base = ir_gen.output_base;
@@ -720,6 +719,7 @@ int main(int arg_count, char **arg_ptr) {
 
 	i32 exit_code = 0;
 
+	// timings_start_section(&timings, str_lit("llvm-opt"));
 	// #if defined(GB_SYSTEM_WINDOWS)
 	// 	// For more passes arguments: http://llvm.org/docs/Passes.html
 	// 	exit_code = system_exec_command_line_app("llvm-opt", false,