memap.py: Allow .a extension for Arm Compiler-generated libraries

The most common extension for static libraries is .a and CMake generates
it with both GCC and Arm toolchains. Mbed CLI 1 generates .ar files with
the Arm Compiler, but since Mbed CLI 2 uses memap.py to generate map
files too, both extensions should be permitted.

This fixes a warning when building greentea tests:

    Malformed input found when parsing ARMCC map: _deps/greentea-client-build/libclient_userio.a(greentea_test_env.o)
    Malformed input found when parsing ARMCC map: _deps/greentea-client-build/libclient_userio.a(greentea_test_env.o)
    Malformed input found when parsing ARMCC map: _deps/greentea-client-build/libclient_userio.a(greentea_test_env.o)
    ...

which repeats over 30 times per test.
pull/15096/head
Lingkai Dong 2021-09-14 15:47:14 +01:00
parent 4cfbea43ca
commit d954841983
1 changed files with 1 additions and 1 deletions

View File

@ -247,7 +247,7 @@ class _GccParser(_Parser):
class _ArmccParser(_Parser):
RE = re.compile(
r'^\s+0x(\w{8})\s+0x(\w{8})\s+(\w+)\s+(\w+)\s+(\d+)\s+[*]?.+\s+(.+)$')
RE_OBJECT = re.compile(r'(.+\.(l|ar))\((.+\.o(bj)?)\)')
RE_OBJECT = re.compile(r'(.+\.(l|a|ar))\((.+\.o(bj)?)\)')
OBJECT_EXTENSIONS = (".o", ".obj")
def parse_object_name(self, line):