diff --git a/main.cc b/main.cc index 4cba8256..b477faa0 100644 --- a/main.cc +++ b/main.cc @@ -960,7 +960,7 @@ static Config parse_nonpositional_args(std::span args, } else if (read_flag(args, "strip-all") || read_flag(args, "s")) { conf.strip_all = true; } else if (read_arg(args, arg, "rpath")) { - conf.rpaths.push_back(std::string(arg)); + conf.rpaths.push_back(arg); } else if (read_arg(args, arg, "version-script")) { conf.version_script.push_back(arg); } else if (read_arg(args, arg, "z")) { diff --git a/mold.h b/mold.h index 24e7f4eb..15285b37 100644 --- a/mold.h +++ b/mold.h @@ -71,7 +71,7 @@ struct Config { int thread_count = -1; std::string sysroot; std::vector globals; - std::vector rpaths; + std::vector rpaths; std::vector library_paths; std::vector trace_symbol; std::vector version_script;