Author:ptrace Comitter:ptrace Date:2026-01-20 06:06:14 UTC

Templates 'lib' & 'arg' now building the binary inside bin/debug or bin/release, depending on your flags

diff --git a/build.jai b/build.jai index f05bb8b..a61f222 100644 --- a/build.jai +++ b/build.jai @@ -89,10 +89,11 @@ build :: () {     print("The workspace w is %\n", w);     make_directory_if_it_does_not_exist("bin");     make_directory_if_it_does_not_exist("bin/debug");     make_directory_if_it_does_not_exist("bin/release");     target_options := get_build_options(w);     target_options.output_executable_name = "jinit";     target_options.output_path = "bin";     if args_compiler_silent  target_options.text_output_flags = 0; @@ -157,6 +158,7 @@ build :: () { build_debug :: (w: Workspace, target_options: *Build_Options) {     log("Choosing debug options...");     target_options.backend =.X64;     target_options.output_path = "bin/debug";     set_optimization(target_options, Optimization_Type.DEBUG, true);     set_build_options(target_options.*, w); } @@ -164,6 +166,7 @@ build_debug :: (w: Workspace, target_options: *Build_Options) { build_release :: (w: Workspace, target_options: *Build_Options) {     log("Choosing release options...");     target_options.backend = .LLVM;     target_options.output_path = "bin/release";     set_optimization(target_options, Optimization_Type.VERY_OPTIMIZED);     set_build_options(target_options.*, w); } diff --git a/src/main.jai b/src/main.jai index 6cdf3f7..8784ef6 100644 --- a/src/main.jai +++ b/src/main.jai @@ -24,7 +24,7 @@  */ /*     +Version: 2.2.1     +Version: 2.3.0 */ #import "Basic"; diff --git a/templates/lib/template.jai b/templates/lib/template.jai index 8036650..a1a3333 100644 --- a/templates/lib/template.jai +++ b/templates/lib/template.jai @@ -38,10 +38,11 @@ build :: () {     print("The workspace w is %\n", w);     make_directory_if_it_does_not_exist("bin");     make_directory_if_it_does_not_exist("bin/debug");     make_directory_if_it_does_not_exist("bin/release");     target_options := get_build_options(w);     target_options.output_executable_name = "program";     target_options.output_path = "bin";     import_path: [..] string;     array_add(*import_path, ..target_options.import_path); @@ -77,6 +78,7 @@ build :: () { build_debug :: (w: Workspace, target_options: *Build_Options) {     log("Choosing debug options...");     target_options.backend =.X64;     target_options.output_path = "bin/debug";     set_optimization(target_options, Optimization_Type.DEBUG, true);     set_build_options(target_options.*, w); } @@ -84,6 +86,7 @@ build_debug :: (w: Workspace, target_options: *Build_Options) { build_release :: (w: Workspace, target_options: *Build_Options) {     log("Choosing release options...");     target_options.backend = .LLVM;     target_options.output_path = "bin/release";     set_optimization(target_options, Optimization_Type.VERY_OPTIMIZED);     set_build_options(target_options.*, w); } diff --git a/templates/with_args/template.jai b/templates/with_args/template.jai index e33d9a1..b03b095 100644 --- a/templates/with_args/template.jai +++ b/templates/with_args/template.jai @@ -38,10 +38,11 @@ build :: () {     print("The workspace w is %\n", w);     make_directory_if_it_does_not_exist("bin");     make_directory_if_it_does_not_exist("bin/debug");     make_directory_if_it_does_not_exist("bin/release");     target_options := get_build_options(w);     target_options.output_executable_name = "program";     target_options.output_path = "bin";     if args_compiler_silent  target_options.text_output_flags = 0; @@ -72,6 +73,7 @@ build :: () { build_debug :: (w: Workspace, target_options: *Build_Options) {     log("Choosing debug options...");     target_options.backend =.X64;     target_options.output_path = "bin/debug";     set_optimization(target_options, Optimization_Type.DEBUG, true);     set_build_options(target_options.*, w); } @@ -79,6 +81,7 @@ build_debug :: (w: Workspace, target_options: *Build_Options) { build_release :: (w: Workspace, target_options: *Build_Options) {     log("Choosing release options...");     target_options.backend = .LLVM;     target_options.output_path = "bin/release";     set_optimization(target_options, Optimization_Type.VERY_OPTIMIZED);     set_build_options(target_options.*, w); }