tests/common/145: Move each target into its own subdir
This helps test whether /WHOLEARCHIVE and --whole-archive arguments resolve into the right subdirectories.
This commit is contained in:
parent
d070100c8c
commit
040fa07e36
|
@ -0,0 +1 @@
|
|||
stlib = static_library('allofme', '../libfile.c')
|
|
@ -0,0 +1,2 @@
|
|||
exe = executable('prog', '../prog.c',
|
||||
link_with : dylib)
|
|
@ -0,0 +1 @@
|
|||
exe2 = executable('prog2', '../prog.c', link_with : dylib2)
|
|
@ -1,5 +1,7 @@
|
|||
project('whole archive', 'c')
|
||||
|
||||
add_project_arguments('-I' + meson.source_root(), language : 'c')
|
||||
|
||||
cc = meson.get_compiler('c')
|
||||
|
||||
if cc.get_id() == 'msvc'
|
||||
|
@ -8,22 +10,15 @@ if cc.get_id() == 'msvc'
|
|||
endif
|
||||
endif
|
||||
|
||||
stlib = static_library('allofme', 'libfile.c')
|
||||
|
||||
# Nothing in dylib.c uses func1, so the linker would throw it
|
||||
# away and thus linking the exe would fail.
|
||||
dylib = shared_library('shlib', 'dylib.c',
|
||||
link_whole : stlib)
|
||||
|
||||
exe = executable('prog', 'prog.c',
|
||||
link_with : dylib)
|
||||
subdir('allofme')
|
||||
subdir('shlib')
|
||||
subdir('exe')
|
||||
|
||||
test('prog', exe)
|
||||
|
||||
# link_whole only
|
||||
static = static_library('static', 'dylib.c')
|
||||
dylib2 = shared_library('link_whole', link_whole : [stlib, static])
|
||||
|
||||
exe2 = executable('prog2', 'prog.c', link_with : dylib2)
|
||||
subdir('stlib')
|
||||
subdir('wholeshlib')
|
||||
subdir('exe2')
|
||||
|
||||
test('prog2', exe2)
|
||||
|
|
|
@ -0,0 +1,4 @@
|
|||
# Nothing in dylib.c uses func1, so the linker would throw it
|
||||
# away and thus linking the exe would fail.
|
||||
dylib = shared_library('shlib', '../dylib.c',
|
||||
link_whole : stlib)
|
|
@ -0,0 +1 @@
|
|||
static = static_library('static', '../dylib.c')
|
|
@ -0,0 +1 @@
|
|||
dylib2 = shared_library('link_whole', link_whole : [stlib, static])
|
Loading…
Reference in New Issue