summaryrefslogtreecommitdiff
path: root/tools/minicargo/manifest.cpp
diff options
context:
space:
mode:
authorJohn Hodge <tpg@mutabah.net>2017-08-22 21:22:41 +0800
committerJohn Hodge <tpg@mutabah.net>2017-08-22 21:22:41 +0800
commit71b1ed79d938a40b7b1c5824674814fe31d78dac (patch)
treefe1953ae8a8c95a071acc074127a15e84c027371 /tools/minicargo/manifest.cpp
parent0eb50366561cd91bed78b3e721e6ea94dbecded1 (diff)
downloadmrust-71b1ed79d938a40b7b1c5824674814fe31d78dac.tar.gz
minicargo - Handle libraries in build script, add libstd/libunwind script files
Diffstat (limited to 'tools/minicargo/manifest.cpp')
-rw-r--r--tools/minicargo/manifest.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/tools/minicargo/manifest.cpp b/tools/minicargo/manifest.cpp
index aab0adac..4e7ec305 100644
--- a/tools/minicargo/manifest.cpp
+++ b/tools/minicargo/manifest.cpp
@@ -343,7 +343,14 @@ void PackageManifest::load_build_script(const ::std::string& path)
// cargo:rustc-link-lib=mysql
else if( key == "rustc-link-lib" ) {
// TODO: Check for an = (otherwise default to dynamic)
- throw ::std::runtime_error("TODO: rustc-link-lib");
+ ::std::string lazy = value;
+ auto pos = lazy.find_first_of('=');
+ if(pos == ::std::string::npos) {
+ rv.rustc_link_lib.push_back(::std::make_pair("static", lazy));
+ }
+ else {
+ throw ::std::runtime_error("TODO: rustc-link-lib");
+ }
}
// cargo:rustc-cfg=foo
else if( key == "rustc-cfg" ) {