diff options
author | John Hodge <tpg@mutabah.net> | 2019-10-29 20:37:51 +0800 |
---|---|---|
committer | John Hodge <tpg@mutabah.net> | 2019-10-29 20:37:51 +0800 |
commit | a1a03108029fa6bd092bc8f141acbc4cdb210e01 (patch) | |
tree | 2670dbc62fe4e3a09fc0818f3f9b966e2109367f /tools/minicargo/build.cpp | |
parent | 2d807e6d573d58a7b5e49cf1642691b0b963a34e (diff) | |
download | mrust-a1a03108029fa6bd092bc8f141acbc4cdb210e01.tar.gz |
minicargo - Fixes to build script support for winapi
Diffstat (limited to 'tools/minicargo/build.cpp')
-rw-r--r-- | tools/minicargo/build.cpp | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tools/minicargo/build.cpp b/tools/minicargo/build.cpp index 5eb07104..efacb6f8 100644 --- a/tools/minicargo/build.cpp +++ b/tools/minicargo/build.cpp @@ -1082,13 +1082,13 @@ bool Builder::build_target(const PackageManifest& manifest, const PackageTarget& StringListKV env; env.push_back("CARGO_MANIFEST_DIR", manifest.directory().to_absolute()); //env.push_back("CARGO_MANIFEST_LINKS", manifest.m_links); - //for(const auto& feat : manifest.m_active_features) - //{ - // ::std::string fn = "CARGO_FEATURE_"; - // for(char c : feat) - // fn += c == '-' ? '_' : tolower(c); - // env.push_back(fn, manifest.m_links); - //} + for(const auto& feat : manifest.active_features()) + { + ::std::string fn = "CARGO_FEATURE_"; + for(char c : feat) + fn += c == '-' ? '_' : toupper(c); + env.push_back(fn, "1"); + } //env.push_back("CARGO_CFG_RELEASE", ""); env.push_back("OUT_DIR", out_dir); env.push_back("TARGET", m_opts.target_name ? m_opts.target_name : HOST_TARGET); @@ -1206,6 +1206,7 @@ bool Builder::spawn_process(const char* exe_name, const StringList& args, const #else for(auto kv : env) { + DEBUG("putenv " << kv.first << "=" << kv.second); _putenv_s(kv.first, kv.second); } #endif |