From 774efb0c5bceac7ef53b04fca67a2fb8f3b5057e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E6=9C=B1=E5=A4=A9=E9=BE=99=20=28Armink=29?= Date: Mon, 20 Jun 2022 13:45:54 +0800 Subject: [PATCH] [tools][target][eclipse] Update the libs import for eclipse project. (#6065) --- tools/eclipse.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/tools/eclipse.py b/tools/eclipse.py index 31c1bb914b..ae363aba7f 100644 --- a/tools/eclipse.py +++ b/tools/eclipse.py @@ -320,6 +320,12 @@ def HandleToolOption(tools, env, project, reset): # add new libs if 'LIBS' in env: 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) SubElement(option, 'listOptionValue', { 'builtIn': 'false', 'value': formatedLib})