diff options
author | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-11 15:33:43 +0200 |
---|---|---|
committer | Boris Kolpackov <boris@codesynthesis.com> | 2016-07-11 15:33:43 +0200 |
commit | e3839b800a9ab1bc4824b742ccaef7ce3d59c291 (patch) | |
tree | 181c9c78605d6b3a92101065e507f577325ac3d8 /build2/cxx/module.cxx | |
parent | 0760742386e8e6034bbd619487ef156bc574e408 (diff) |
Reimplement Windows rpath emulation using embedded manifests
As a bonus, everyone now gets a sane default manifest.
Diffstat (limited to 'build2/cxx/module.cxx')
-rw-r--r-- | build2/cxx/module.cxx | 16 |
1 files changed, 12 insertions, 4 deletions
diff --git a/build2/cxx/module.cxx b/build2/cxx/module.cxx index 28892cf..caeea9b 100644 --- a/build2/cxx/module.cxx +++ b/build2/cxx/module.cxx @@ -256,6 +256,9 @@ namespace build2 } } + const string& tsys (cast<string> (r["cxx.target.system"])); + const string& tclass (cast<string> (r["cxx.target.class"])); + // Initialize the bin module. Only do this if it hasn't already been // loaded so that we don't overwrite user's bin.* settings. // @@ -274,6 +277,15 @@ namespace build2 info << "cxx.target is " << ct; } + // If our target is MinGW, then we will need the resource compiler + // (windres) in order to embed the manifest. + // + if (tsys == "mingw32") + { + if (!cast_false<bool> (b["bin.rc.loaded"])) + load_module ("bin.rc", r, b, loc, false, bin_hints); + } + // Register target types. // { @@ -329,8 +341,6 @@ namespace build2 r.insert<libso> (perform_install_id, "cxx.install", install::instance); } - - // Configure "installability" of our target types. // using namespace install; @@ -342,8 +352,6 @@ namespace build2 // Create additional target types for certain target platforms. // - const string& tclass (cast<string> (r["cxx.target.class"])); - if (tclass == "windows") { const target_type& dll (b.derive_target_type<file> ("dll").first); |