nixpkgs/pkgs/development/compilers/swift/compiler/patches/clang-wrap.patch
2022-10-10 21:26:47 +02:00

19 lines
442 B
Diff

Wrap the clang produced during the build
--- a/tools/driver/CMakeLists.txt
+++ b/tools/driver/CMakeLists.txt
@@ -59,6 +59,13 @@ endif()
add_dependencies(clang clang-resource-headers)
+# Nix: wrap the clang build.
+add_custom_command(
+ TARGET clang POST_BUILD
+ COMMAND nix-swift-make-clang-wrapper $<TARGET_FILE:clang>
+ VERBATIM
+)
+
if(NOT CLANG_LINKS_TO_CREATE)
set(CLANG_LINKS_TO_CREATE clang++ clang-cl clang-cpp)
endif()