Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit 6c771e7d authored by Pirama Arumuga Nainar's avatar Pirama Arumuga Nainar
Browse files

Revert "Remove flags rejected by RBE input processor"

This reverts commit a4724a0c.

Reason for revert: reclient has an updated deps scanner now.
Bug: http://b/248371171
Test: enable RBE; RBE_CLANG_TIDY_EXEC_STRATEGY=remote; make tidy-soong_subset


(cherry picked from https://android-review.googlesource.com/q/commit:2c36e5efceae94424b513878cf6dc4e9640651ab)
Merged-In: Id876bd7eee1e5606f8dc05903f77f135b47da360
Change-Id: Id876bd7eee1e5606f8dc05903f77f135b47da360
parent b7b3de83
Loading
Loading
Loading
Loading
+1 −6
Original line number Diff line number Diff line
@@ -681,16 +681,11 @@ func transformSourceToObj(ctx ModuleContext, subdir string, srcFiles, noTidySrcs
			tidyCmd := "${config.ClangBin}/clang-tidy"

			rule := clangTidy
			reducedCFlags := moduleFlags
			if ctx.Config().UseRBE() && ctx.Config().IsEnvTrue("RBE_CLANG_TIDY") {
				rule = clangTidyRE
				// b/248371171, work around RBE input processor problem
				// some cflags rejected by input processor, but usually
				// do not affect included files or clang-tidy
				reducedCFlags = config.TidyReduceCFlags(reducedCFlags)
			}

			sharedCFlags := shareFlags("cFlags", reducedCFlags)
			sharedCFlags := shareFlags("cFlags", moduleFlags)
			srcRelPath := srcFile.Rel()

			// Add the .tidy rule
+0 −9
Original line number Diff line number Diff line
@@ -16,7 +16,6 @@ package config

import (
	"android/soong/android"
	"regexp"
	"strings"
)

@@ -281,11 +280,3 @@ func TidyFlagsForSrcFile(srcFile android.Path, flags string) string {
	}
	return flags
}

var (
	removedCFlags = regexp.MustCompile(" -fsanitize=[^ ]*memtag-[^ ]* ")
)

func TidyReduceCFlags(flags string) string {
	return removedCFlags.ReplaceAllString(flags, " ")
}