[llvm] 4976be1 - [gn build] Make 'compiler-rt' depend on include dir
Nico Weber via llvm-commits
llvm-commits at lists.llvm.org
Thu Oct 21 18:08:49 PDT 2021
Author: Nico Weber
Date: 2021-10-21T21:08:36-04:00
New Revision: 4976be1e955d2f5ebd4e28df07235d86e9228e09
URL: https://github.com/llvm/llvm-project/commit/4976be1e955d2f5ebd4e28df07235d86e9228e09
DIFF: https://github.com/llvm/llvm-project/commit/4976be1e955d2f5ebd4e28df07235d86e9228e09.diff
LOG: [gn build] Make 'compiler-rt' depend on include dir
That way, the headers in llvm/utils/gn/secondary/compiler-rt/include
are copied when running `ninja compiler-rt`. (Previously, they were
only copied when running `check-hwasan` or when building the
compiler-rt/include target.)
(Since they should be copied only once, depend on the target in the
host toolchain. I think default_toolchain should work just as well,
it just needs to be a single fixed toolchain. check-hwasan depends
through host_toolchain, so let's use that here too.)
Prevents errors like
testing/fuzzed_data_provider.h:8:10: fatal error: 'fuzzer/FuzzedDataProvider.h' file not found
when building with locally-built clang. (For now, you still have to
explicitly build the 'compiler-rt' target. Maybe we should make the
clang target depend on that in the GN build?)
Differential Revision: https://reviews.llvm.org/D112238
Added:
Modified:
llvm/utils/gn/secondary/compiler-rt/BUILD.gn
Removed:
################################################################################
diff --git a/llvm/utils/gn/secondary/compiler-rt/BUILD.gn b/llvm/utils/gn/secondary/compiler-rt/BUILD.gn
index 9fa7c2569808..7a0f40be3f92 100644
--- a/llvm/utils/gn/secondary/compiler-rt/BUILD.gn
+++ b/llvm/utils/gn/secondary/compiler-rt/BUILD.gn
@@ -18,7 +18,9 @@ if (android_ndk_path != "") {
]
}
group("compiler-rt") {
- deps = []
+ deps = [
+ "//compiler-rt/include($host_toolchain)",
+ ]
foreach(toolchain, supported_toolchains) {
deps += [ "//compiler-rt/lib($toolchain)" ]
}
More information about the llvm-commits
mailing list