diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-28 15:59:06 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-03-28 16:03:35 +0200 |
commit | 96f2131e593e206f0e458409f22adfff8c1b5356 (patch) | |
tree | fdb71a7a435d631872e0413dbe13113a636932de /build2/cxx/link.cxx | |
parent | 69801c4e23f877359118e55ed291737f4fbece04 (diff) |
Clean up variable usage
Diffstat (limited to 'build2/cxx/link.cxx')
-rw-r--r-- | build2/cxx/link.cxx | 14 |
1 files changed, 8 insertions, 6 deletions
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<string> (rs["config.cxx"]).c_str ()); + args.push_back (cast<path> (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<strings> (l)) - sargs.push_back ("-Wl,-rpath," + p); + for (const dir_path& p: cast<dir_paths> (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<string> (rs["config.bin.ar"]).c_str (); + args[0] = cast<path> (rs["config.bin.ar"]).string ().c_str (); args.push_back (relt.string ().c_str ()); } else { - args[0] = cast<string> (rs["config.cxx"]).c_str (); + args[0] = cast<path> (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<string> (ranlib).c_str (), relt.string ().c_str (), nullptr}; + cast<path> (ranlib).string ().c_str (), + relt.string ().c_str (), + nullptr}; if (verb >= 2) print_process (args); |