Skip to content

Commit

Permalink
build: Update link flags for tests
Browse files Browse the repository at this point in the history
(cherry picked from commit fa936f8)
Signed-off-by: LIU Hao <lh_mouse@126.com>
  • Loading branch information
lhmouse committed Sep 24, 2024
1 parent 17eca39 commit af5253b
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 @@ -344,6 +344,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 @@ -372,10 +373,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 af5253b

Please sign in to comment.