build: manually add standard library search paths for linking

this reverts commit a174566 since the actually reason for failing has
been found. the isysroot flag overwrites the framework and library
search paths. though we only need to overwrite the former and there is
no way to just overwrite that one. we manually add the standard library
search paths to the very end of the linking command, so it won't
interfere with the search paths extracted by waf.

Fixes #5791
This commit is contained in:
Akemi 2018-06-08 23:03:28 +02:00 committed by Jan Ekström
parent 5865086aa8
commit 2e7a4f717c
2 changed files with 11 additions and 8 deletions

View File

@ -100,7 +100,17 @@ def check_cocoa(ctx, dependency_identifier):
includes = ctx.srcnode.abspath(),
linkflags = '-fobjc-arc')
return fn(ctx, dependency_identifier)
res = fn(ctx, dependency_identifier)
if res and ctx.env.MACOS_SDK:
# on macOS we explicitly need to set the SDK path, otherwise it can lead
# to linking warnings or errors
ctx.env.append_value('LAST_LINKFLAGS', [
'-isysroot', ctx.env.MACOS_SDK,
'-L/usr/lib',
'-L/usr/local/lib'
])
return res
def check_openal(ctx, dependency_identifier):
checks = [

View File

@ -154,13 +154,6 @@ def build(ctx):
bridge, header, tgt, src)
return task.exec_command(cmd)
if ctx.dependency_satisfied('cocoa') and ctx.env.MACOS_SDK:
# on macOS we explicitly need to set the SDK path, otherwise it can lead to
# linking warnings or errors
ctx.env.append_value('LINKFLAGS', [
'-isysroot', ctx.env.MACOS_SDK
])
if ctx.dependency_satisfied('macos-cocoa-cb'):
swift_source = [
( "osdep/macOS_mpv_helper.swift" ),