From 551335bf530d0773c962e0b6f4715599cf383029 Mon Sep 17 00:00:00 2001 From: Christoph Urlacher Date: Thu, 23 Apr 2026 17:56:46 +0200 Subject: [PATCH] store additional files with builds (flake/startup/linkerscript/...) --- flake.nix | 7 ++++++- scripts/menu.pl | 23 ++++++++--------------- scripts/nixos.just | 2 +- scripts/runner.pl | 2 ++ scripts/wasm.just | 12 +++++++++--- 5 files changed, 26 insertions(+), 20 deletions(-) diff --git a/flake.nix b/flake.nix index 595a90b..e55c2f0 100644 --- a/flake.nix +++ b/flake.nix @@ -323,8 +323,13 @@ rec { owner = "christoph"; repo = "wamr"; - rev = "cda2009deb85511089b04b0ac736ad4da2d07e58"; + # With mmap_space in .text.wamr_aot + rev = "cda2008deb85511089b04b0ac736ad4da2d07e58"; hash = "sha256-CN6xTiwzF4Jbrpf21TF5c/C03Xb3urwkibRuIXjoU/w="; + + # Without mmap_space in .text.wamr_aot + # rev = "4e7aed33fe53bf3ee4a3f2fe582c74816f850759"; + # hash = "sha256-/4BKwoFDRfkA+DmbWagxdtkCDAED5rxbz5e4xvjvVWU="; }; nativeBuildInputs = with pkgs; [cmake]; diff --git a/scripts/menu.pl b/scripts/menu.pl index fbc5907..049dfaf 100644 --- a/scripts/menu.pl +++ b/scripts/menu.pl @@ -174,25 +174,18 @@ my %handlers = ( } # Insert charts - my $attach_image = sub { - my ($name) = @_; - - return unless ( -f "$local_archive_dir/$experiment/$name.svg" ); - - system( - 'cp', '-i', - "$local_archive_dir/$experiment/$name.svg", - "$local_obsidian_attach/${experiment}_$name.svg" - ); - - system( 'obsidian', 'append', "file=zettel/$experiment", - "content=![[${experiment}_$name.svg]]\n" ); - }; - system( 'obsidian', 'append', "file=zettel/$experiment", "content=## Charts\n\n" ); + + my $attach_image = sub { + my ($name) = @_; + + system( 'obsidian', 'append', "file=zettel/$experiment", +"content=![$name](file://$local_archive_dir/$experiment/$name.svg)\n" + ); + }; $attach_image->("single_result"); $attach_image->("scatter"); } diff --git a/scripts/nixos.just b/scripts/nixos.just index 8ea88bf..ef0304a 100644 --- a/scripts/nixos.just +++ b/scripts/nixos.just @@ -166,7 +166,7 @@ build module="__help" target="fail" mode="aot": just clean {{ module }} just create-build-dir {{ module }} - just copy-c-module {{ module }} + just copy-auxiliary {{ module }} if [ "{{ mode }}" = "aot" ]; then just build-wasm-module {{ module }} diff --git a/scripts/runner.pl b/scripts/runner.pl index 4eddbd9..a1aa512 100644 --- a/scripts/runner.pl +++ b/scripts/runner.pl @@ -269,3 +269,5 @@ for my $experiment (@experiments) { inject($experiment); results($experiment); } + +Util::notify("Finished all experiments"); diff --git a/scripts/wasm.just b/scripts/wasm.just index ad51ba3..b7983ce 100644 --- a/scripts/wasm.just +++ b/scripts/wasm.just @@ -53,8 +53,7 @@ CROSS_WAMRCFLAGS := "\ --target=i386 \ --cpu=generic \ --opt-level=0 \ ---enable-indirect-mode \ ---disable-llvm-intrinsics \ +--xip \ " LINUX_WAMRCFLAGS := "\ --target=i386 \ @@ -131,7 +130,14 @@ build-c-module module target="fail": fi [private] -copy-c-module module: +copy-auxiliary module: + cp flake.nix {{ BUILD_DIR }}-{{ module }}/flake.nix + cp scripts/runner.pl {{ BUILD_DIR }}-{{ module }}/runner.pl + cp scripts/wasm.just {{ BUILD_DIR }}-{{ module }}/wasm.just + cp targets/lib.h {{ BUILD_DIR }}-{{ module }}/lib.h + cp targets/linker.ld {{ BUILD_DIR }}-{{ module }}/linker.ld + cp targets/startup.s {{ BUILD_DIR }}-{{ module }}/startup.s + cp targets/syscalls.c {{ BUILD_DIR }}-{{ module }}/syscalls.c cp targets/wasm-module/{{ module }}.cpp {{ BUILD_DIR }}-{{ module }}/wasm-module.cpp # =================================================================================================================== #