From 257cb1c8e8db768f1a32245d388c46d7c6e60c6a Mon Sep 17 00:00:00 2001 From: Andrew Childs Date: Thu, 19 Nov 2020 16:48:10 +0900 Subject: print-reexports: rehome, tbd4 support, cross compilation --- pkgs/os-specific/darwin/print-reexports/setup-hook.sh | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 pkgs/os-specific/darwin/print-reexports/setup-hook.sh (limited to 'pkgs/os-specific/darwin/print-reexports/setup-hook.sh') diff --git a/pkgs/os-specific/darwin/print-reexports/setup-hook.sh b/pkgs/os-specific/darwin/print-reexports/setup-hook.sh new file mode 100644 index 00000000000..9efb00aeb4d --- /dev/null +++ b/pkgs/os-specific/darwin/print-reexports/setup-hook.sh @@ -0,0 +1,19 @@ +fixupOutputHooks+=('checkTbdReexports') + +checkTbdReexports() { + local dir="$1" + + while IFS= read -r -d $'\0' tbd; do + echo "checkTbdRexports: checking re-exports in $tbd" + while read -r target; do + local expected="${target%.dylib}.tbd" + if ! [ -e "$expected" ]; then + echo -e "Re-export missing:\n\t'$target'\n\t(expected '$expected')" + echo -e "While processing\n\t'$tbd'" + exit 1 + else + echo "Re-exported target '$target' ok" + fi + done < <(print-reexports "$tbd") + done < <(find $prefix -type f -name '*.tbd' -print0) +} -- cgit 1.4.1