Skip to content

Commit

Permalink
Merge pull request #40 from pascalj/master
Browse files Browse the repository at this point in the history
Always pass --lib to cargo with link-args
  • Loading branch information
malept authored Sep 19, 2017
2 parents 078bb4b + 9fe8fd4 commit c4eb696
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions lib/thermite/cargo.rb
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,7 @@ def cargo_rustc_args
args = []
unless config.dynamic_linker_flags == '' || config.target_os == 'mingw32'
args.push(
'--lib',
'--',
'-C',
"link-args=#{config.dynamic_linker_flags}"
Expand Down
2 changes: 1 addition & 1 deletion test/lib/thermite/cargo_test.rb
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ def test_run_cargo_rustc_with_dynamic_linker_flags
if RbConfig::CONFIG['target_os'] == 'mingw32'
mock_module.expects(:run_cargo).with('rustc').once
else
mock_module.expects(:run_cargo).with('rustc', '--', '-C', 'link-args=foo bar').once
mock_module.expects(:run_cargo).with('rustc', '--lib', '--', '-C', 'link-args=foo bar').once
end
mock_module.run_cargo_rustc('debug')
end
Expand Down

0 comments on commit c4eb696

Please sign in to comment.