Some compilers that act as linker drivers (dmd and ldc) need to split arguments that GCC combines with , (ie, -Wl,-foo,bar -> -L=-foo -L=bar). As such we need to detect that the previous argument contained -soname, and not wrap that in a --start-group/--end-group This modifies the shared library test to demonstrate the problem, with a test case. Fixes #6359pull/6356/head
parent
92e80d54e5
commit
d0172432a7
5 changed files with 52 additions and 1 deletions
@ -0,0 +1,20 @@ |
||||
#!/usr/bin/env python3 |
||||
|
||||
import argparse |
||||
import subprocess |
||||
|
||||
def main(): |
||||
parser = argparse.ArgumentParser() |
||||
parser.add_argument('ldd') |
||||
parser.add_argument('bin') |
||||
args = parser.parse_args() |
||||
|
||||
p, o, _ = subprocess.run([args.ldd, args.bin], stdout=subprocess.PIPE) |
||||
assert p == 0 |
||||
o = o.decode() |
||||
assert 'libstuff.so =>' in o, 'libstuff so not in linker path.' |
||||
assert 'libstuff.so => not found' not in o, 'libstuff.so not found correctly' |
||||
|
||||
|
||||
if __name__ == '__main__': |
||||
main() |
@ -0,0 +1,14 @@ |
||||
import std.stdio; |
||||
import std.string : format; |
||||
|
||||
export int printLibraryString (string str) |
||||
{ |
||||
writeln ("Library says: %s".format (str)); |
||||
return 4; |
||||
} |
||||
|
||||
version (Windows) |
||||
{ |
||||
import core.sys.windows.dll; |
||||
mixin SimpleDllMain; |
||||
} |
@ -0,0 +1,2 @@ |
||||
ldyn = shared_library('stuff', 'libstuff.d', install : true) |
||||
|
Loading…
Reference in new issue