diff options
author | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-09-24 18:06:14 +0200 |
---|---|---|
committer | Bent Bisballe Nyeng <deva@aasimon.org> | 2021-09-24 21:47:42 +0200 |
commit | ef7ab06044c155e4728e5e30e3262de2bb40cb29 (patch) | |
tree | 3277f3c95f36565c960c968c1bd9ec8e4d63c9e2 /src/rebuild.cc | |
parent | ecfc610acff6a9359ae5e7f0b225c5b26b189591 (diff) |
Fix re-compilation of library itself after boostrap. Add support for supplying libctor lib and include paths.
Diffstat (limited to 'src/rebuild.cc')
-rw-r--r-- | src/rebuild.cc | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/rebuild.cc b/src/rebuild.cc index 353beb0..7c90fca 100644 --- a/src/rebuild.cc +++ b/src/rebuild.cc @@ -60,12 +60,24 @@ int unreg(const char* location) void recompileCheck(const Settings& settings, int argc, char* argv[], bool force, bool relaunch_allowed) { + using namespace std::string_literals; + bool dirty{force}; std::vector<std::string> args; args.push_back("-s"); args.push_back("-O3"); args.push_back("-std=c++17"); + + if(hasConfiguration(cfg::ctor_includedir)) + { + args.push_back("-I"s + getConfiguration(cfg::ctor_includedir)); + } + if(hasConfiguration(cfg::ctor_libdir)) + { + args.push_back("-L"s + getConfiguration(cfg::ctor_libdir)); + } + args.push_back("-lctor"); args.push_back("-pthread"); std::filesystem::path binFile(argv[0]); @@ -113,7 +125,7 @@ void recompileCheck(const Settings& settings, int argc, char* argv[], args.push_back(location); } } - args.push_back("libctor.a"); + args.push_back("-o"); args.push_back(binFile.string()); |