From 7e5462e9c9a0c430e7cc24b767f12f4652f1655c Mon Sep 17 00:00:00 2001 From: Saiyedul Islam Date: Fri, 5 Jun 2026 20:39:40 +0530 Subject: [PATCH] Add llvm patching support Emissary repo contains patches which have not yet been merged into `llvm-project`. This will allow keeping llvm patches in emissary repo and apply them cleanly whenever required for testing emissary. --- bin/build_emissary.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/bin/build_emissary.sh b/bin/build_emissary.sh index bea946e1a..bb8d958d3 100755 --- a/bin/build_emissary.sh +++ b/bin/build_emissary.sh @@ -99,6 +99,11 @@ export OPENMPI_DIR=$HOME/local/rocmopenmpi patchrepo "$AOMP_REPOS/emissary" +EMISSARY_LLVM_PATCH_SCRIPT="$AOMP_REPOS/emissary/patches/apply_llvm_patch.sh" +if [ -f "$EMISSARY_LLVM_PATCH_SCRIPT" ] ; then + "$EMISSARY_LLVM_PATCH_SCRIPT" apply "$AOMP_REPOS/llvm-project" "$AOMP_REPOS/emissary" +fi + if [ "$1" != "nocmake" ] && [ "$1" != "install" ] ; then if [ -d "$BUILD_EMISSARY_DIR" ] ; then echo @@ -170,4 +175,7 @@ if [ "$1" == "install" ] ; then exit 1 fi removepatch "$AOMP_REPOS/emissary" + if [ -f "$EMISSARY_LLVM_PATCH_SCRIPT" ] ; then + "$EMISSARY_LLVM_PATCH_SCRIPT" remove "$AOMP_REPOS/llvm-project" "$AOMP_REPOS/emissary" + fi fi