[tools][target][eclipse] Update the libs import for eclipse project. (#6065)

This commit is contained in:
朱天龙 (Armink) 2022-06-20 13:45:54 +08:00 committed by GitHub
parent 8bee7a0c23
commit 774efb0c5b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 6 additions and 0 deletions

View File

@ -320,6 +320,12 @@ def HandleToolOption(tools, env, project, reset):
# add new libs # add new libs
if 'LIBS' in env: if 'LIBS' in env:
for lib in env['LIBS']: for lib in env['LIBS']:
lib_name = os.path.basename(str(lib))
if lib_name.endswith('.a'):
if lib_name.startswith('lib'):
lib = lib_name[3:].split('.')[0]
else:
lib = ':' + lib_name
formatedLib = ConverToRttEclipseLibFormat(lib) formatedLib = ConverToRttEclipseLibFormat(lib)
SubElement(option, 'listOptionValue', { SubElement(option, 'listOptionValue', {
'builtIn': 'false', 'value': formatedLib}) 'builtIn': 'false', 'value': formatedLib})