Add ccflags option to SConstruct configuration

This commit is contained in:
DevTekVE
2023-11-25 07:40:04 +00:00
parent 6806fb83df
commit ea5643afb1
2 changed files with 11 additions and 1 deletions
+1 -1
View File
@@ -2,7 +2,7 @@
<tool name="Poetry SCons Build Debug" showInMainMenu="false" showInEditor="false" showInProject="false" showInSearchPopup="false" disabled="false" useConsole="true" showConsoleOnStdOut="false" showConsoleOnStdErr="false" synchronizeAfterRun="true">
<exec>
<option name="COMMAND" value="poetry" />
<option name="PARAMETERS" value="run scons -u -j10 --compile_db" />
<option name="PARAMETERS" value="run scons -u -j10 --compile_db --ccflags=&quot;-fno-inline&quot;" />
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
</exec>
</tool>
+10
View File
@@ -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=[