I have the following project structure:
llvm-pass/
CMakeLists.txt
BUILD
program/
main.cc
BUILD
WORKSPACE
In llvm-pass/BUILD
cmake_external(
name="llvm-pass",
output="llvm-pass.so"
)
In program/BUILD
cc_binary(
name="program",
srcs = ["main.cc"],
copts = ["-Xclang -load ???"],
data = ["//llvm-pass"]
)
I don't know how to determine the path of the llvm-pass object so that I may pass it as an argument to the program compilation rule. Any ideas?
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…