-
Notifications
You must be signed in to change notification settings - Fork 1.6k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Test that system shlibs with undefined symbols can be found
- Loading branch information
Showing
5 changed files
with
73 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
11 changes: 9 additions & 2 deletions
11
test cases/unit/39 external, internal library rpath/built library/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,12 +1,19 @@ | ||
project('built library', 'c') | ||
|
||
cc = meson.get_compiler('c') | ||
|
||
# bar_in_system has undefined symbols, but still must be found | ||
bar_system_dep = cc.find_library('bar_in_system') | ||
|
||
foo_system_dep = cc.find_library('foo_in_system') | ||
|
||
faa_pkg_dep = dependency('faa_pkg') | ||
|
||
l = shared_library('bar_built', 'bar.c', | ||
install: true, | ||
dependencies : [foo_system_dep, faa_pkg_dep]) | ||
|
||
e = executable('prog', 'prog.c', link_with: l, install: true) | ||
test('testprog', e) | ||
if host_machine.system() == 'darwin' | ||
e = executable('prog', 'prog.c', link_with: l, install: true) | ||
test('testprog', e) | ||
endif |
6 changes: 6 additions & 0 deletions
6
test cases/unit/39 external, internal library rpath/external library/bar.c
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
int some_undefined_func (void); | ||
|
||
int bar_system_value (void) | ||
{ | ||
return some_undefined_func (); | ||
} |
12 changes: 10 additions & 2 deletions
12
test cases/unit/39 external, internal library rpath/external library/meson.build
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,17 @@ | ||
project('system library', 'c') | ||
project('system library', 'c', default_options : ['b_lundef=false']) | ||
|
||
shared_library('foo_in_system', 'foo.c', install : true) | ||
l = shared_library('faa_pkg', 'faa.c', install: true) | ||
|
||
if host_machine.system() == 'darwin' | ||
frameworks = ['-framework', 'CoreFoundation', '-framework', 'CoreMedia'] | ||
else | ||
frameworks = [] | ||
endif | ||
|
||
pkg = import('pkgconfig') | ||
pkg.generate(name: 'faa_pkg', | ||
libraries: [l, '-framework', 'CoreFoundation', '-framework', 'CoreMedia'], | ||
libraries: [l] + frameworks, | ||
description: 'FAA, a pkg-config test library') | ||
|
||
shared_library('bar_in_system', 'bar.c', install : true) |