[fix][building.py]修复动态模块的option的bug (#6081)

* [fix][building.py]修复动态模块option的bug
This commit is contained in:
wugensheng 2022-06-15 16:58:16 +08:00 committed by GitHub
parent 9d0f088e20
commit ccbecfc220
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View File

@ -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'])

View File

@ -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')