summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorarmink <[email protected]>2019-08-15 10:22:29 +0800
committerarmink <[email protected]>2019-08-15 10:22:29 +0800
commite6a07139ce595d7045fc54748544708e5921f2b7 (patch)
tree9ce697e7e05e76becf0a952073929004e419c758
parent4e136e4271d6a608e5ddbcda181825c2b38d3748 (diff)
[tools] Fix eclipse configuration for lib paths.
-rw-r--r--tools/eclipse.py9
1 files changed, 9 insertions, 0 deletions
diff --git a/tools/eclipse.py b/tools/eclipse.py
index bc4e670e36..d781a701cb 100644
--- a/tools/eclipse.py
+++ b/tools/eclipse.py
@@ -218,6 +218,15 @@ def HandleToolOption(tools, env, project, reset):
for lib in env['LIBS']:
SubElement(option, 'listOptionValue', {'builtIn': 'false', 'value': lib})
+ # update lib paths
+ if option.get('id').find('c.linker.paths') != -1 and env.has_key('LIBPATH'):
+ # remove old lib paths
+ for item in option.findall('listOptionValue'):
+ option.remove(item)
+ # add new old lib paths
+ for path in env['LIBPATH']:
+ SubElement(option, 'listOptionValue', {'builtIn': 'false', 'value': path})
+
return