Call llvm-config --prefix and use it in a BUILD rule
问题 I have a following rule in WORKSPACE : new_local_repository( name = "llvm", path = "/opt/local/libexec/llvm-4.0", build_file= "llvm.BUILD") I would like to now use hardcoded path for llvm. llvm-config --prefix can give me the directory for llvm. What is the correct way to get this? Can I just use standard python commands (e.g. subprocess package)? 回答1: As @abergmeier said, you can create a custom repository rule, run the command, create a symlink pointing to its output, and create a BUILD