iwyu: Fix invocation of include-cleaner tool
The invocation is supposed to be at the project top-level and not from the build folder as it can otherwise hide Abseil headers.
Bug: webrtc:15874
Change-Id: Iaa481dce8dc08b0d2e66e9170627e8963f7c0db9
Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/351120
Commit-Queue: Florent Castelli <orphis@webrtc.org>
Reviewed-by: Harald Alvestrand <hta@webrtc.org>
Cr-Commit-Position: refs/heads/main@{#42359}
diff --git a/tools_webrtc/iwyu/apply-include-cleaner b/tools_webrtc/iwyu/apply-include-cleaner
index a68f882..7164b35 100755
--- a/tools_webrtc/iwyu/apply-include-cleaner
+++ b/tools_webrtc/iwyu/apply-include-cleaner
@@ -96,8 +96,7 @@
error "File $FILE is not found"
fi
-cd $WORKDIR
-../../$CLEANER $INCLUDE_ARGS $COMMAND ../../$FILE
+$CLEANER -p $WORKDIR $INCLUDE_ARGS $COMMAND $FILE
echo "Finished. Check diff, compile, gn gen --check and git cl format"
echo "before uploading."