d: Handle linker search paths correctly for non-GNU compilers

pull/1490/head
Matthias Klumpp 8 years ago committed by Jussi Pakkanen
parent 80f870c4bb
commit d9cabe9f0c
  1. 10
      mesonbuild/compilers.py

@ -1861,6 +1861,16 @@ class DCompiler(Compiler):
# translate library link flag # translate library link flag
dcargs.append('-L' + arg) dcargs.append('-L' + arg)
continue continue
elif arg.startswith('-L/') or arg.startswith('-L./'):
# we need to handle cases where -L is set by e.g. a pkg-config
# setting to select a linker search path. We can however not
# unconditionally prefix '-L' with '-L' because the user might
# have set this flag too to do what it is intended to for this
# compiler (pass flag through to the linker)
# Hence, we guess here whether the flag was intended to pass
# a linker search path.
dcargs.append('-L' + arg)
continue
dcargs.append(arg) dcargs.append(arg)
return dcargs return dcargs

Loading…
Cancel
Save