diff options
author | John Hodge <tpg@ucc.asn.au> | 2019-07-20 14:34:45 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2019-07-20 14:34:45 +0800 |
commit | 76688e1144c5d8cf9494a269a8ec6f3c42e1d227 (patch) | |
tree | 70b26c83263914e055b76ced7e139941ef95f7a1 /tools | |
parent | 9b15cb5ab10ff29bed7afeb6520f4b3844f73bad (diff) | |
download | mrust-76688e1144c5d8cf9494a269a8ec6f3c42e1d227.tar.gz |
minicargo - Hackily support dylib building (env var to turn it on)
Diffstat (limited to 'tools')
-rw-r--r-- | tools/minicargo/build.cpp | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/tools/minicargo/build.cpp b/tools/minicargo/build.cpp index 88c105ea..7809a6f9 100644 --- a/tools/minicargo/build.cpp +++ b/tools/minicargo/build.cpp @@ -647,10 +647,13 @@ Builder::Builder(const BuildOptions& opts, size_t total_targets): outfile /= ::format("lib", target.m_name, crate_suffix, "-plugin" EXESUF); break; case PackageTarget::CrateType::dylib: - // TODO: Enable this once mrustc can set rpath or absolute paths - //if(crate_type) *crate_type = "dylib"; - //outfile /= ::format("lib", target.m_name, crate_suffix, DLLSUF); - //break; + if( getenv("MINICARGO_DYLIB") ) + { + // TODO: Enable this once mrustc can set rpath or absolute paths + if(crate_type) *crate_type = "dylib"; + outfile /= ::format("lib", target.m_name, crate_suffix, DLLSUF); + break; + } case PackageTarget::CrateType::rlib: if(crate_type) *crate_type = "rlib"; outfile /= ::format("lib", target.m_name, crate_suffix, ".rlib"); |