From d84cef41c43775dc53bb2793b3d86200d134bfbc Mon Sep 17 00:00:00 2001 From: "bernard.xiong@gmail.com" Date: Tue, 7 Jun 2011 16:13:00 +0000 Subject: [PATCH] add has_libcpu option in PrepareBuilding function. git-svn-id: https://rt-thread.googlecode.com/svn/trunk@1461 bbd45198-f89e-11dd-88c7-29a3b14d5316 --- tools/building.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tools/building.py b/tools/building.py index 1b5715feb4..2fa5786e59 100644 --- a/tools/building.py +++ b/tools/building.py @@ -244,7 +244,7 @@ class Win32Spawn: print data return 0 -def PrepareBuilding(env, root_directory): +def PrepareBuilding(env, root_directory, has_libcpu=False): import SCons.cpp import rtconfig @@ -273,7 +273,7 @@ def PrepareBuilding(env, root_directory): PreProcessor.process_contents(contents) BuildOptions = PreProcessor.cpp_namespace - if (GetDepend('RT_USING_NEWLIB') == False) and rtconfig.PLATFORM == 'gcc': + if (GetDepend('RT_USING_NEWLIB') == False and GetDepend('RT_USING_NOLIBC') == False) and rtconfig.PLATFORM == 'gcc': AddDepend('RT_USING_MINILIBC') # add target option @@ -295,7 +295,8 @@ def PrepareBuilding(env, root_directory): # include kernel objs.append(SConscript('src/SConscript', variant_dir='build/src', duplicate=0)) # include libcpu - objs.append(SConscript('libcpu/SConscript', variant_dir='build/libcpu', duplicate=0)) + if not has_libcpu: + objs.append(SConscript('libcpu/SConscript', variant_dir='build/libcpu', duplicate=0)) # include components objs.append(SConscript('components/SConscript', variant_dir='build/components', duplicate=0))