From 89a552a5a3bf508d02c50094528092fb387dc140 Mon Sep 17 00:00:00 2001 From: Jeremy Leconte Date: Wed, 2 Oct 2024 17:02:13 +0200 Subject: [PATCH] Work around an issue with clang-include-cleaner. Problem has been reported here: https://github.com/llvm/llvm-project/issues/110843 Change-Id: Iaa578a17a724a80ea350db1494229c5af4c454b3 Bug: b/236227627 Reviewed-on: https://webrtc-review.googlesource.com/c/src/+/364463 Reviewed-by: Harald Alvestrand Commit-Queue: Jeremy Leconte Cr-Commit-Position: refs/heads/main@{#43154} --- tools_webrtc/iwyu/apply-include-cleaner | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tools_webrtc/iwyu/apply-include-cleaner b/tools_webrtc/iwyu/apply-include-cleaner index 06c108ddb7..c96bf35a5e 100755 --- a/tools_webrtc/iwyu/apply-include-cleaner +++ b/tools_webrtc/iwyu/apply-include-cleaner @@ -102,7 +102,11 @@ if [ -z $FILE ] || [ ! -f $FILE ]; then error "File $FILE is not found" fi -OUTPUT=$($CLEANER -p $WORKDIR $INCLUDE_ARGS $COMMAND $FILE) +# Run the command in $WORKDIR because of this reported issue: +# https://github.com/llvm/llvm-project/issues/110843 +cd $WORKDIR +OUTPUT=$(../../$CLEANER $INCLUDE_ARGS $COMMAND ../../$FILE) +cd - # include-cleaner does not support custom mappings for certain deps # this ensures that the gtest/gmock deps it inserts are replaced