From 6d1a32b1246e902d2823f48960f7f2edd94e3a59 Mon Sep 17 00:00:00 2001 From: Ed_ Date: Tue, 19 Mar 2024 18:52:33 -0400 Subject: [PATCH] Move odin compiler and ols to their own directory separate from thirdparty packages: toolchain --- ols.json | 8 ++++++-- scripts/build.ps1 | 9 +++++---- scripts/update_deps.ps1 | 30 +++++++++++++++++++++++------- thirdparty/Odin | 1 - thirdparty/backtrace | 1 + toolchain/Odin | 1 + {thirdparty => toolchain}/ols | 0 7 files changed, 36 insertions(+), 14 deletions(-) delete mode 160000 thirdparty/Odin create mode 160000 thirdparty/backtrace create mode 160000 toolchain/Odin rename {thirdparty => toolchain}/ols (100%) diff --git a/ols.json b/ols.json index 488bbd9..42ffa58 100644 --- a/ols.json +++ b/ols.json @@ -15,10 +15,14 @@ }, { "name": "ini", - "path": "C:/projects/SectrPrototype/thirdparty/ini" + "path": "C:/projects/SectrPrototype/thirdparty/packages/ini" + }, + { + "name": "backtrace", + "path": "C:/projects/SectrPrototype/thirdparty/packages/backtrace" } ], - "odin_command": "C:/projects/SectrPrototype/thirdparty/Odin/odin.exe", + "odin_command": "C:/projects/SectrPrototype/toolchain/Odin/odin.exe", "enable_document_symbols": true, "enable_fake_methods": false, "enable_format": false, diff --git a/scripts/build.ps1 b/scripts/build.ps1 index 197394b..6b07802 100644 --- a/scripts/build.ps1 +++ b/scripts/build.ps1 @@ -14,7 +14,8 @@ $path_code = join-path $path_root 'code' $path_build = join-path $path_root 'build' $path_scripts = join-path $path_root 'scripts' $path_thirdparty = join-path $path_root 'thirdparty' -$path_odin = join-path $path_thirdparty 'odin' +$path_toolchain = join-path $path_root 'toolchain' +$path_odin = join-path $path_toolchain 'odin' if ( -not( test-path $path_build) ) { new-item -ItemType Directory -Path $path_build @@ -160,7 +161,7 @@ push-location $path_root $build_args += '.' $build_args += $flag_build_mode_dll $build_args += $flag_output_path + $module_dll - # $build_args += ($flag_collection + $pkg_collection_thirdparty) + $build_args += ($flag_collection + $pkg_collection_thirdparty) $build_args += $flag_micro_architecture_native # $build_args += $flag_use_separate_modules $build_args += $flag_thread_count + $CoreCount_Physical @@ -189,7 +190,7 @@ push-location $path_root $module_dll_pre_build_hash = get-filehash -path $module_dll -Algorithm MD5 } - # write-host $build_args + write-host $build_args Invoke-WithColorCodedOutput -command { & $odin_compiler $build_args } # Invoke-WithColorCodedOutput -command { & $raddbg "$odin_compiler" "$build_args" } @@ -238,7 +239,7 @@ push-location $path_root $build_args += $command_build $build_args += './host' $build_args += $flag_output_path + $executable - # $build_args += ($flag_collection + $pkg_collection_thirdparty) + $build_args += ($flag_collection + $pkg_collection_thirdparty) $build_args += $flag_micro_architecture_native $build_args += $flag_use_separate_modules $build_args += $flag_thread_count + $CoreCount_Physical diff --git a/scripts/update_deps.ps1 b/scripts/update_deps.ps1 index a52b800..fe45e86 100644 --- a/scripts/update_deps.ps1 +++ b/scripts/update_deps.ps1 @@ -4,13 +4,16 @@ $path_root = git rev-parse --show-toplevel $path_code = join-path $path_root 'code' $path_build = join-path $path_root 'build' $path_thirdparty = join-path $path_root 'thirdparty' +$path_toolchain = join-path $path_root 'toolchain' -$url_ols_repo = 'https://github.com/Ed94/ols' -$url_odin_repo = 'https://github.com/Ed94/Odin.git' -$url_ini_parser = 'https://github.com/laytan/odin-ini-parser.git' -$path_odin = join-path $path_thirdparty 'Odin' -$path_ini_parser = join-path $path_thirdparty 'ini' -$path_ols = join-path $path_thirdparty 'ols' +$url_backtrace_repo = 'https://github.com/Ed94/back.git' +$url_ini_parser = 'https://github.com/laytan/odin-ini-parser.git' +$url_odin_repo = 'https://github.com/Ed94/Odin.git' +$url_ols_repo = 'https://github.com/Ed94/ols' +$path_backtrace = join-path $path_thirdparty 'backtrace' +$path_ini_parser = join-path $path_thirdparty 'ini' +$path_odin = join-path $path_toolchain 'Odin' +$path_ols = join-path $path_toolchain 'ols' $incremental_checks = Join-Path $PSScriptRoot 'helpers/incremental_checks.ps1' . $incremental_checks @@ -18,6 +21,9 @@ $incremental_checks = Join-Path $PSScriptRoot 'helpers/incremental_checks.ps1' if ( -not(Test-Path $path_thirdparty) ) { new-item -ItemType Directory -Path $path_thirdparty } +if ( -not(Test-Path $path_toolchain) ) { + new-item -ItemType Directory -Path $path_toolchain +} $binaries_dirty = $false @@ -88,10 +94,20 @@ if (Test-Path -Path $path_ini_parser) } else { - Write-Host "Cloning Odin repository..." + Write-Host "Cloning ini repository..." git clone $url_ini_parser $path_ini_parser } +if (test-path $path_backtrace) +{ + git -C $path_backtrace pull +} +else +{ + Write-Host "Cloning backtrace repository..." + git clone $url_backtrace_repo $path_backtrace +} + $path_vendor = join-path $path_odin 'vendor' $path_vendor_raylib = join-path $path_vendor 'raylib' $path_raylib_dlls = join-path $path_vendor_raylib 'windows' diff --git a/thirdparty/Odin b/thirdparty/Odin deleted file mode 160000 index 5dadf56..0000000 --- a/thirdparty/Odin +++ /dev/null @@ -1 +0,0 @@ -Subproject commit 5dadf56000bf6772ab4807f5ff38729dbd16f925 diff --git a/thirdparty/backtrace b/thirdparty/backtrace new file mode 160000 index 0000000..0896a90 --- /dev/null +++ b/thirdparty/backtrace @@ -0,0 +1 @@ +Subproject commit 0896a908c70227fa3b1f09a29ab1879ae45ff732 diff --git a/toolchain/Odin b/toolchain/Odin new file mode 160000 index 0000000..d9e318a --- /dev/null +++ b/toolchain/Odin @@ -0,0 +1 @@ +Subproject commit d9e318a22076638f91aa6c168c8c7f5f47f2ed6f diff --git a/thirdparty/ols b/toolchain/ols similarity index 100% rename from thirdparty/ols rename to toolchain/ols