diff options
author | Peter Collingbourne <peter@pcc.me.uk> | 2019-01-15 21:44:59 +0000 |
---|---|---|
committer | Peter Collingbourne <peter@pcc.me.uk> | 2019-01-15 21:44:59 +0000 |
commit | 25d4a0d08dc5d7045d657e04e70f05669c68c782 (patch) | |
tree | ad31e577438d330ca9c8b5412011422b03bc2f9f | |
parent | 94f611c227a4fa1993e7706259ce4d4068c91851 (diff) |
gn build: Add a resource_dir.gni file.
The path to the resource directory will end up being used in several
more places once the support for running check-hwasan lands. This
moves the definition to a central location so that it can be used
from those places.
Differential Revision: https://reviews.llvm.org/D56700
-rw-r--r-- | llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn | 8 | ||||
-rw-r--r-- | llvm/utils/gn/secondary/clang/resource_dir.gni | 3 | ||||
-rw-r--r-- | llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn | 4 |
3 files changed, 8 insertions, 7 deletions
diff --git a/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn b/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn index c2b89afb845..2c472ce7839 100644 --- a/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn +++ b/llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn @@ -1,5 +1,5 @@ +import("//clang/resource_dir.gni") import("//clang/utils/TableGen/clang_tablegen.gni") -import("//llvm/version.gni") # Generate arm_neon.h clang_tablegen("arm_neon") { @@ -15,8 +15,6 @@ clang_tablegen("arm_fp16") { output_name = "arm_fp16.h" } -output_dir = "$root_out_dir/lib/clang/$llvm_version/include" - copy("arm_headers") { visibility = [ ":Headers" ] deps = [ @@ -25,7 +23,7 @@ copy("arm_headers") { ] sources = get_target_outputs(":arm_neon") + get_target_outputs(":arm_fp16") outputs = [ - "$output_dir/{{source_file_part}}", + "$clang_resource_dir/include/{{source_file_part}}", ] } @@ -158,6 +156,6 @@ copy("Headers") { "cuda_wrappers/new", ] outputs = [ - "$output_dir/{{source_target_relative}}", + "$clang_resource_dir/include/{{source_target_relative}}", ] } diff --git a/llvm/utils/gn/secondary/clang/resource_dir.gni b/llvm/utils/gn/secondary/clang/resource_dir.gni new file mode 100644 index 00000000000..b5a877a8d9c --- /dev/null +++ b/llvm/utils/gn/secondary/clang/resource_dir.gni @@ -0,0 +1,3 @@ +import("//llvm/version.gni") + +clang_resource_dir = "$root_build_dir/lib/clang/$llvm_version" diff --git a/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn index 78e36cd9db5..9f4c697cc01 100644 --- a/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn +++ b/llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn @@ -1,9 +1,9 @@ -import("//llvm/version.gni") +import("//clang/resource_dir.gni") # FIXME: Make this support more platforms. assert(current_os == "android") -runtime_output_dir = "$root_build_dir/lib/clang/$llvm_version/lib/linux" +runtime_output_dir = "$clang_resource_dir/lib/linux" runtime_target = "aarch64-android" action("version_script") { |