llvm-config

Call llvm-config --prefix and use it in a BUILD rule

懵懂的女人 提交于 2020-01-20 05:29:44
问题 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

Call llvm-config --prefix and use it in a BUILD rule

大憨熊 提交于 2020-01-20 05:29:04
问题 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

Call llvm-config --prefix and use it in a BUILD rule

亡梦爱人 提交于 2019-11-29 13:11:17
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)? As @abergmeier said, you can create a custom repository rule, run the command, create a symlink pointing to its output, and create a BUILD file for the repository: WORKSPACE file: workspace(name = "io_bazel") load("//foo:repo.bzl", "llvm_configure")