mirror of
https://github.com/sunnypilot/sunnypilot.git
synced 2026-07-25 03:12:09 +08:00
Add ccflags option to SConstruct configuration
This commit is contained in:
Generated
+1
-1
@@ -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="-fno-inline"" />
|
||||
<option name="WORKING_DIRECTORY" value="$ProjectFileDir$" />
|
||||
</exec>
|
||||
</tool>
|
||||
|
||||
+10
@@ -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=[
|
||||
|
||||
Reference in New Issue
Block a user