Skip to content

Commit

Permalink
build: Update link flags for tests
Browse files Browse the repository at this point in the history
  • Loading branch information
lhmouse committed Sep 24, 2024
1 parent 5b7a810 commit fa936f8
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion meson.build
Original file line number Diff line number Diff line change
Expand Up @@ -346,6 +346,7 @@ import('pkgconfig').generate(lib_mcfgthread_dll,
foreach src: test_src
test_c_args = []
test_cpp_args = []
test_link_args = []
test_dependencies = []
test_link_with = lib_mcfgthread_dll

Expand Down Expand Up @@ -374,10 +375,14 @@ foreach src: test_src
test_cpp_args = [ '-std=c++11', '-Wpedantic' ]
endif

if src.endswith('.cpp')
test_link_args = [ '-static-libgcc', '-static-libstdc++' ]
endif

test_exe = executable(src.underscorify(), src,
c_args: test_c_args,
cpp_args: test_cpp_args,
link_args: [ '-static-libgcc', '-static-libstdc++' ],
link_args: test_link_args,
dependencies: test_dependencies,
link_with: test_link_with,
install: false)
Expand Down

0 comments on commit fa936f8

Please sign in to comment.