Added parameter to compile only the stdlib.

This commit is contained in:
Patrick 2024-02-02 01:57:36 +01:00
parent c43e8ebd6c
commit 3d284a0bde

View File

@ -10,8 +10,14 @@ AddOption(
action = 'store',
default = 'x86_64'
)
AddOption(
'--stdlib',
dest = 'stdlib',
action = 'store_true'
)
target = GetOption('target')
stdlib = GetOption('stdlib')
env = Environment(tools = ['default', 'compilation_db'])
env.Append(CCFLAGS = ['-g', '-O0', '-fno-stack-protector'])
@ -20,7 +26,8 @@ env.Append(CPPDEFINES = ['BASTL_EXTENSIONS=1'])
env['ISO_FILES'] = []
env = SConscript('targets/_any/SConscript', exports = 'env')
env = SConscript(f'targets/{target}/SConscript', exports = 'env')
if not stdlib:
env = SConscript(f'targets/{target}/SConscript', exports = 'env')
comp_db = env.CompilationDatabase(target = '#compile_commands.json')
env.Default(comp_db)