From 615ab6049ff878416f6ea933ba5f172ce5ec1c0c Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Fri, 12 Aug 2022 00:54:59 +0200 Subject: [PATCH] Introducing `MRUSTC_LIB` env variable The idea is simple: we need some way to put `-latomic` to `gcc` call. Let add a dedicated variable which allows to add any library which may be needed. It may fixes: https://github.com/thepowersgang/mrustc/pull/214 --- src/main.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/src/main.cpp b/src/main.cpp index bdaa79f70..0c0a24412 100644 --- a/src/main.cpp +++ b/src/main.cpp @@ -893,6 +893,11 @@ ProgramParams::ProgramParams(int argc, char *argv[]) this->lib_search_dirs.push_back(a); } + if( const auto* a = getenv("MRUSTC_LIBD") ) + { + this->libraries.push_back(a); + } + // Hacky command-line parsing for( int i = 1; i < argc; i ++ ) {