[PATCH] D56700: gn build: Add a resource_dir.gni file.
Peter Collingbourne via Phabricator via llvm-commits
llvm-commits at lists.llvm.org
Mon Jan 14 23:31:23 PST 2019
pcc updated this revision to Diff 181729.
pcc marked 2 inline comments as done.
pcc added a comment.
- Rename to clang_resource_dir
Repository:
rL LLVM
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D56700/new/
https://reviews.llvm.org/D56700
Files:
llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
llvm/utils/gn/secondary/clang/resource_dir.gni
llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
Index: llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
+++ 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") {
Index: llvm/utils/gn/secondary/clang/resource_dir.gni
===================================================================
--- /dev/null
+++ 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"
Index: llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
===================================================================
--- llvm/utils/gn/secondary/clang/lib/Headers/BUILD.gn
+++ 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 @@
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 @@
]
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 @@
"cuda_wrappers/new",
]
outputs = [
- "$output_dir/{{source_target_relative}}",
+ "$clang_resource_dir/include/{{source_target_relative}}",
]
}
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D56700.181729.patch
Type: text/x-patch
Size: 1925 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-commits/attachments/20190115/d3c97d87/attachment.bin>
More information about the llvm-commits
mailing list