parent
01569fee2e
commit
f396c71c52
7 changed files with 60 additions and 1 deletions
@ -0,0 +1,9 @@ |
||||
int func1() |
||||
{ |
||||
return 1; |
||||
} |
||||
|
||||
int func1b() |
||||
{ |
||||
return 1; |
||||
} |
@ -0,0 +1,6 @@ |
||||
int func1(); |
||||
|
||||
int func2() |
||||
{ |
||||
return func1() + 1; |
||||
} |
@ -0,0 +1,8 @@ |
||||
project('test static link libs', 'c') |
||||
|
||||
# libfunc2 should contain both func1() and func2() symbols |
||||
libfunc1 = static_library('func1', 'func1.c', |
||||
install : false) |
||||
libfunc2 = static_library('func2', 'func2.c', |
||||
link_whole : libfunc1, |
||||
install : true) |
@ -0,0 +1,7 @@ |
||||
project('test static link', 'c') |
||||
|
||||
cc = meson.get_compiler('c') |
||||
|
||||
# Verify that installed libfunc2.a is usable |
||||
func2_dep = cc.find_library('func2') |
||||
test('test1', executable('test1', 'test1.c', dependencies : func2_dep)) |
@ -0,0 +1,7 @@ |
||||
int func1b(); |
||||
int func2(); |
||||
|
||||
int main(int argc, char *argv[]) |
||||
{ |
||||
return func2() + func1b() == 3 ? 0 : 1; |
||||
} |
Loading…
Reference in new issue