From 05e4d908dfbac3444466263639ec6ac5f5d8f235 Mon Sep 17 00:00:00 2001 From: DevTekVE Date: Fri, 17 Nov 2023 22:53:16 +0100 Subject: [PATCH] Enhance SConstruct by enabling arbitrary compiler flags (#30484) * Update SConstruct allow no-inline Allows disabling inline functions when compiling to help with the debugging process * Update SConstruct typos * Update SConstruct --- SConstruct | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/SConstruct b/SConstruct index e72e344516..eb9cd737e2 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=[