[llvm] r351255 - gn build: Add a resource_dir.gni file.
Peter Collingbourne via llvm-commits
llvm-commits at lists.llvm.org
Tue Jan 15 13:45:00 PST 2019
Author: pcc
Date: Tue Jan 15 13:44:59 2019
New Revision: 351255
URL: http://llvm.org/viewvc/llvm-project?rev=351255&view=rev
Log:
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
Added:
llvm/trunk/utils/gn/secondary/clang/resource_dir.gni
Modified:
llvm/trunk/utils/gn/secondary/clang/lib/Headers/BUILD.gn
llvm/trunk/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
Modified: llvm/trunk/utils/gn/secondary/clang/lib/Headers/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang/lib/Headers/BUILD.gn?rev=351255&r1=351254&r2=351255&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang/lib/Headers/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/clang/lib/Headers/BUILD.gn Tue Jan 15 13:44:59 2019
@@ -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}}",
]
}
Added: llvm/trunk/utils/gn/secondary/clang/resource_dir.gni
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/clang/resource_dir.gni?rev=351255&view=auto
==============================================================================
--- llvm/trunk/utils/gn/secondary/clang/resource_dir.gni (added)
+++ llvm/trunk/utils/gn/secondary/clang/resource_dir.gni Tue Jan 15 13:44:59 2019
@@ -0,0 +1,3 @@
+import("//llvm/version.gni")
+
+clang_resource_dir = "$root_build_dir/lib/clang/$llvm_version"
Modified: llvm/trunk/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn
URL: http://llvm.org/viewvc/llvm-project/llvm/trunk/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn?rev=351255&r1=351254&r2=351255&view=diff
==============================================================================
--- llvm/trunk/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn (original)
+++ llvm/trunk/utils/gn/secondary/compiler-rt/lib/hwasan/BUILD.gn Tue Jan 15 13:44:59 2019
@@ -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") {
More information about the llvm-commits
mailing list