wscript: *prepend* CFLAGS and LINKFLAGS
Appending new options at end of the array has unfortunate effect
of not allowing easy override of flags set in wscript.
This change makes add_cflag() and add_linkflag() prepend,
thus leaving the supplied during configure parameters
take precedence by being at the end of the parameter list.
Fix for [a386c3e] LDFLAGS is ignored
(cherry picked from commit 88b70fcdd7
)
This commit is contained in:
parent
7728d2d40e
commit
b02998a215
6
wscript
6
wscript
|
@ -64,11 +64,11 @@ def options(opt):
|
||||||
opt.load('parallel_debug')
|
opt.load('parallel_debug')
|
||||||
|
|
||||||
def add_cflag(conf, flag):
|
def add_cflag(conf, flag):
|
||||||
conf.env.append_unique('CXXFLAGS', flag)
|
conf.env.prepend_unique('CXXFLAGS', flag)
|
||||||
conf.env.append_unique('CFLAGS', flag)
|
conf.env.prepend_unique('CFLAGS', flag)
|
||||||
|
|
||||||
def add_linkflag(conf, flag):
|
def add_linkflag(conf, flag):
|
||||||
conf.env.append_unique('LINKFLAGS', flag)
|
conf.env.prepend_unique('LINKFLAGS', flag)
|
||||||
|
|
||||||
def check_gcc_optimizations_enabled(flags):
|
def check_gcc_optimizations_enabled(flags):
|
||||||
gcc_optimizations_enabled = False
|
gcc_optimizations_enabled = False
|
||||||
|
|
Loading…
Reference in New Issue