fixed bug #1474597 - Mac OS X 10.4 build failures
git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@4664 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
9ed073277d
commit
991295e17f
4 changed files with 49 additions and 17 deletions
|
@ -36,19 +36,26 @@ def check_compile_flag(ctx, flag):
|
|||
"""
|
||||
Checks if a linker flag is valid.
|
||||
"""
|
||||
def check_link_flag(ctx, flag):
|
||||
def check_link_flag(ctx, flag, run = 0, extension = '.c', code = None):
|
||||
ctx.Message('Checking for linker flag %s... ' % flag)
|
||||
|
||||
old_flags = ctx.env['LINKFLAGS']
|
||||
ctx.env.Append(LINKFLAGS = flag)
|
||||
|
||||
test = """
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
if code:
|
||||
test = code
|
||||
else:
|
||||
test = """
|
||||
int main() {
|
||||
return 0;
|
||||
}
|
||||
"""
|
||||
|
||||
result = ctx.TryLink(test, extension)
|
||||
|
||||
if run:
|
||||
result = result and ctx.TryRun(test, extension)[0]
|
||||
|
||||
result = ctx.TryLink(test, '.c')
|
||||
ctx.Result(result)
|
||||
|
||||
if not result:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue