ProprocessScript.sh 665 B

12345678910
  1. #!/bin/bash
  2. # 获取脚本所在目录
  3. SCRIPT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
  4. # 切换到项目根目录
  5. cd "$SCRIPT_DIR/.."
  6. opt -load build/ProprocessFunctionPass.so -add-project-metadata -project-name=Bunker < combine_output/projectA.bc > proprocess_output/projectA_tagged.bc
  7. opt -load build/ProprocessFunctionPass.so -add-project-metadata -project-name=Target < combine_output/projectB.bc > proprocess_output/projectB_tagged.bc
  8. llvm-link proprocess_output/projectA_tagged.bc proprocess_output/projectB_tagged.bc -o proprocess_output/combined_tagged.bc
  9. llvm-dis proprocess_output/combined_tagged.bc -o proprocess_output/combined_tagged.ll