From d806ad841cef0071a0c4138cc4b2d630b75cd3e1 Mon Sep 17 00:00:00 2001 From: David Mak Date: Mon, 16 Oct 2023 13:44:29 +0800 Subject: [PATCH] standalone: Fix run_demo script - Link main and module*.bc together if using multiple threads - Fix temporary files not being deleted --- nac3standalone/demo/run_demo.sh | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/nac3standalone/demo/run_demo.sh b/nac3standalone/demo/run_demo.sh index b93dfdb..2d720b0 100755 --- a/nac3standalone/demo/run_demo.sh +++ b/nac3standalone/demo/run_demo.sh @@ -48,11 +48,9 @@ else clang -c -std=gnu11 -Wall -Wextra -O3 -emit-llvm -o demo.bc demo.c - if ls module*.bc >/dev/null 2>&1; then - llvm-link -o module.bc module*.bc main.bc - else - llvm-link -o module.bc main.bc - fi + shopt -s nullglob + llvm-link -o module.bc module*.bc main.bc + shopt -u nullglob if [ -z "$outfile" ]; then lli --extra-module demo.bc --extra-module irrt.bc module.bc