Allow building with a specific win32 targeted cross compiler (#3305366)

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@6156 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
f0rt 2011-06-25 19:29:38 +00:00
parent 9540aa5d5c
commit 737a5c8468
3 changed files with 8 additions and 1 deletions

View file

@ -31,7 +31,7 @@ defenv['ALIGN_FLAG'] = '-Wl,--file-alignment,512'
defenv['CPP_REQUIRES_STDLIB'] = 1
defenv['SUBSYS_CON'] = '-Wl,--subsystem,console'
defenv['MSVCRT_FLAG'] = ''
defenv['STDCALL'] = '__attribute__((__stdcall__))'
defenv['STDCALL'] = '"__attribute__((__stdcall__))"'
### defines

View file

@ -61,6 +61,11 @@ prefixes = SCons.Util.Split("""
""")
def find(env):
# Explicitly specified toolchain to build Windows executables
# takes predominance.
prefix = SCons.Script.ARGUMENTS.get('XGCC_W32_PREFIX', None)
if prefix:
prefixes.insert(0, prefix)
for prefix in prefixes:
# First search in the SCons path and then the OS path:
if env.WhereIs(prefix + 'gcc') or SCons.Util.WhereIs(prefix + 'gcc'):