From ccbecfc220ac3224c5469aac7a1392a64f3a7c3e Mon Sep 17 00:00:00 2001 From: wugensheng <82647680+wugensheng-code@users.noreply.github.com> Date: Wed, 15 Jun 2022 16:58:16 +0800 Subject: [PATCH] =?UTF-8?q?[fix][building.py]=E4=BF=AE=E5=A4=8D=E5=8A=A8?= =?UTF-8?q?=E6=80=81=E6=A8=A1=E5=9D=97=E7=9A=84option=E7=9A=84bug=20(#6081?= =?UTF-8?q?)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * [fix][building.py]修复动态模块option的bug --- tools/building.py | 12 +++++++++++- tools/options.py | 5 ++--- 2 files changed, 13 insertions(+), 4 deletions(-) diff --git a/tools/building.py b/tools/building.py index e807188151..8e11de73e8 100644 --- a/tools/building.py +++ b/tools/building.py @@ -389,6 +389,16 @@ def PrepareModuleBuilding(env, root_directory, bsp_directory): PreProcessor.process_contents(contents) BuildOptions = PreProcessor.cpp_namespace + AddOption('--buildlib', + dest = 'buildlib', + type = 'string', + help = 'building library of a component') + AddOption('--cleanlib', + dest = 'cleanlib', + action = 'store_true', + default = False, + help = 'clean up the library by --buildlib') + # add program path env.PrependENVPath('PATH', rtconfig.EXEC_PATH) @@ -607,7 +617,7 @@ def DefineGroup(name, src, depend, **parameters): paths.append(os.path.abspath(item)) group['LOCAL_CPPPATH'] = paths - + if rtconfig.PLATFORM == 'gcc': if 'CFLAGS' in group: group['CFLAGS'] = utils.GCCC99Patch(group['CFLAGS']) diff --git a/tools/options.py b/tools/options.py index 3db1e8b653..947a0259f9 100644 --- a/tools/options.py +++ b/tools/options.py @@ -26,8 +26,8 @@ from SCons.Script import AddOption import platform def AddOptions(): - ''' ===== Add options to SCons ===== ''' - + ''' ===== Add generic options to SCons ===== ''' + AddOption('--dist', dest = 'make-dist', action = 'store_true', @@ -120,4 +120,3 @@ def AddOptions(): action = 'store_true', default = False, help = 'make menuconfig for RT-Thread BSP') -