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 old-commit-hash: 05e4d908dfbac3444466263639ec6ac5f5d8f235
This commit is contained in:
10
SConstruct
10
SConstruct
@@ -38,6 +38,12 @@ 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',
|
||||
help='use SNPE on PC')
|
||||
@@ -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