+ if (!options::extra_library_path.empty() &&
+ set_extra_library_path(options::extra_library_path.c_str()) != LDPS_OK) {
+ (*message)(LDPL_ERROR, "Unable to set the extra library path.");
+ return LDPS_ERR;
+ }
+
+ for (std::vector<std::string>::iterator i = options::pass_through.begin(),
+ e = options::pass_through.end();
+ i != e; ++i) {
+ std::string &item = *i;
+ const char *item_p = item.c_str();
+ if (llvm::StringRef(item).startswith("-l")) {
+ if (add_input_library(item_p + 2) != LDPS_OK) {
+ (*message)(LDPL_ERROR, "Unable to add library to the link.");
+ return LDPS_ERR;
+ }
+ } else {
+ if (add_input_file(item_p) != LDPS_OK) {
+ (*message)(LDPL_ERROR, "Unable to add .o file to the link.");
+ return LDPS_ERR;
+ }
+ }
+ }
+