[tools] Fix the sys.path issue in IARVersion.

This commit is contained in:
Bernard Xiong 2018-04-15 14:39:35 +08:00
parent 32f393ffcb
commit 74d045093b
2 changed files with 5 additions and 3 deletions

View File

@ -1,6 +1,4 @@
from building import *
from distutils.version import LooseVersion
from iar import IARVersion
Import('rtconfig')
@ -14,6 +12,9 @@ CPPDEFINES = ['RT_USING_DLIBC']
if rtconfig.PLATFORM == 'iar':
if GetDepend('RT_USING_DFS'):
from distutils.version import LooseVersion
from iar import IARVersion
CPPDEFINES = CPPDEFINES + ['_DLIB_FILE_DESCRIPTOR']
if LooseVersion(IARVersion()) < LooseVersion("8.20.1"):

View File

@ -124,6 +124,7 @@ def PrepareBuilding(env, root_directory, has_libcpu=False, remove_components = [
Env = env
Rtt_Root = os.path.abspath(root_directory)
sys.path = sys.path + [os.path.join(Rtt_Root, 'tools')]
# add compability with Keil MDK 4.6 which changes the directory of armcc.exe
if rtconfig.PLATFORM == 'armcc':