From 96f2131e593e206f0e458409f22adfff8c1b5356 Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 28 Mar 2016 15:59:06 +0200 Subject: Clean up variable usage --- build2/cxx/link.cxx | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) (limited to 'build2/cxx/link.cxx') diff --git a/build2/cxx/link.cxx b/build2/cxx/link.cxx index c0ea6d3..aa60c7e 100644 --- a/build2/cxx/link.cxx +++ b/build2/cxx/link.cxx @@ -123,7 +123,7 @@ namespace build2 cstrings args; string std_storage; - args.push_back (cast (rs["config.cxx"]).c_str ()); + args.push_back (cast (rs["config.cxx"]).string ().c_str ()); append_options (args, bs, "cxx.coptions"); append_std (args, bs, std_storage); append_options (args, bs, "cxx.loptions"); @@ -877,8 +877,8 @@ namespace build2 // precedence. // if (auto l = t["bin.rpath"]) - for (const string& p: cast (l)) - sargs.push_back ("-Wl,-rpath," + p); + for (const dir_path& p: cast (l)) + sargs.push_back ("-Wl,-rpath," + p.string ()); // Then the paths of the shared libraries we are linking to. Unless // this is update for install, in which case we have to do something @@ -978,12 +978,12 @@ namespace build2 if (lt == type::a) { - args[0] = cast (rs["config.bin.ar"]).c_str (); + args[0] = cast (rs["config.bin.ar"]).string ().c_str (); args.push_back (relt.string ().c_str ()); } else { - args[0] = cast (rs["config.cxx"]).c_str (); + args[0] = cast (rs["config.cxx"]).string ().c_str (); args.push_back ("-o"); args.push_back (relt.string ().c_str ()); } @@ -1048,7 +1048,9 @@ namespace build2 if (ranlib) { const char* args[] = { - cast (ranlib).c_str (), relt.string ().c_str (), nullptr}; + cast (ranlib).string ().c_str (), + relt.string ().c_str (), + nullptr}; if (verb >= 2) print_process (args); -- cgit v1.1