Skip to content

Commit

Permalink
Merge remote-tracking branch 'origin/develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
devops committed May 22, 2024
2 parents be6fcbf + dbbb8d0 commit cac6a20
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 3 deletions.
12 changes: 11 additions & 1 deletion bin/llvm-kompile-testing
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,17 @@ trap 'rm -rf "$dt_dir"' INT TERM EXIT
definition=$(realpath "$1")
mode="$2"
shift; shift
( cd "@PROJECT_SOURCE_DIR@"/matching && mvn exec:java -Dexec.args="$definition qbaL $dt_dir 1" -q )

matching_dir="@PROJECT_SOURCE_DIR@/matching"
installed_jar="$matching_dir/target/llvm-backend-matching-1.0-SNAPSHOT-jar-with-dependencies.jar"

if [ ! -f "$installed_jar" ]; then
echo "Pattern matching compiler isn't installed!"
echo " looking for a jar file at $installed_jar"
exit 1
fi

java -jar "$installed_jar" "$definition" qbaL "$dt_dir" 1

llvm_kompile_flags=()
clang_flags=()
Expand Down
6 changes: 4 additions & 2 deletions nix/overlay.nix
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,11 @@ let
mkdir -p "$out/bin"
cp ${llvm-backend.src}/bin/llvm-kompile-testing "$out/bin"
sed -i "$out/bin/llvm-kompile-testing" \
-e '/@PROJECT_SOURCE_DIR@/ c ${java} -jar ${jar} $definition qbaL $dt_dir 1'
-e 's!installed_jar=.*!installed_jar="${jar}"!g'
substituteInPlace $out/bin/llvm-kompile-testing \
--replace 'llvm-kompile' '${llvm-backend}/bin/llvm-kompile'
--replace 'llvm-kompile' '${llvm-backend}/bin/llvm-kompile' \
--replace 'java -jar "$installed_jar" "$definition" qbaL "$dt_dir" 1' \
'${java} -jar "$installed_jar" "$definition" qbaL "$dt_dir" 1'
chmod +x "$out/bin/llvm-kompile-testing"
patchShebangs "$out/bin/llvm-kompile-testing"
'';
Expand Down

0 comments on commit cac6a20

Please sign in to comment.