Change grep pattern so it can report number of CppCompile actions correctly without being impacted by setting -march on command line twice.

Bug: 266930443
Test: build/soong/tests/apex_cc_module_arch_variant_tests.sh
Change-Id: Ifd74e8cfc86dd94fce632beac049cc81430bfc46
This commit is contained in:
Wei Li
2023-01-27 13:33:45 -08:00
parent 3420d978cf
commit 80f1ef15cc

View File

@@ -56,7 +56,7 @@ build/soong/soong_ui.bash --make-mode BP2BUILD_VERBOSE=1 --skip-soong-tests bp2b
# Number of CppCompile actions with arch variant flag
actions_with_arch_variant_num=$(call_bazel aquery --config=bp2build --config=ci --config=android \
'mnemonic("CppCompile", deps(//build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal.apex))' | grep -c "\-march=$ARCH_VARIANT_CFLAG")
'mnemonic("CppCompile", deps(//build/bazel/examples/apex/minimal:build.bazel.examples.apex.minimal.apex))' | grep -c \'-march=$ARCH_VARIANT_CFLAG\')
# Number of all CppCompile actions
all_cppcompile_actions_num=0