From ea5643afb1d065ce6ca4565d7ac939d85eabf335 Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Sat, 25 Nov 2023 07:40:04 +0000 Subject: [PATCH] Add ccflags option to SConstruct configuration --- .idea/tools/External Tools.xml | 2 +- SConstruct | 10 ++++++++++ 2 files changed, 11 insertions(+), 1 deletion(-) diff --git a/.idea/tools/External Tools.xml b/.idea/tools/External Tools.xml index 1398adacda..75b33a6fd7 100644 --- a/.idea/tools/External Tools.xml +++ b/.idea/tools/External Tools.xml @@ -2,7 +2,7 @@ diff --git a/SConstruct b/SConstruct index 51c944b642..de5a0bbe02 100644 --- a/SConstruct +++ b/SConstruct @@ -37,6 +37,12 @@ AddOption('--clazy', AddOption('--compile_db', action='store_true', help='build clang compilation database') + +AddOption('--ccflags', + action='store', + type='string', + default='', + help='pass arbitrary flags over the command line') AddOption('--snpe', action='store_true', @@ -170,6 +176,10 @@ if arch != "Darwin": cflags += ['-DSWAGLOG="\\"common/swaglog.h\\""'] cxxflags += ['-DSWAGLOG="\\"common/swaglog.h\\""'] +ccflags_option = GetOption('ccflags') +if ccflags_option: + ccflags += ccflags_option.split(' ') + env = Environment( ENV=lenv, CCFLAGS=[