From 3d284a0bded3877e36b4fd5bdf9ea0fe9eabf2a8 Mon Sep 17 00:00:00 2001 From: Patrick Wuttke Date: Fri, 2 Feb 2024 01:57:36 +0100 Subject: [PATCH] Added parameter to compile only the stdlib. --- SConstruct | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/SConstruct b/SConstruct index 8a29e1d..2a47c03 100644 --- a/SConstruct +++ b/SConstruct @@ -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)