From c52a2921ed83051d9304601adcfdc107c06b06cb Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Tue, 6 Apr 2021 14:13:45 +0200 Subject: Report environment variables in build2 metadata --- odb/odb.cxx | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/odb/odb.cxx b/odb/odb.cxx index 2854fbb..8958a9a 100644 --- a/odb/odb.cxx +++ b/odb/odb.cxx @@ -598,6 +598,9 @@ main (int argc, char* argv[]) { ostream& o (cout); + // While ODB itself doesn't use any environment variables, it uses GCC + // underneath which does (see "Environment Variables Affecting GCC"). + // // Note that the export.metadata variable should be the first non- // blank/comment line. // @@ -605,7 +608,8 @@ main (int argc, char* argv[]) << "export.metadata = 1 odb" << endl << "odb.name = [string] odb" << endl << "odb.version = [string] '" << ODB_COMPILER_VERSION_STR << '\'' << endl - << "odb.checksum = [string] '" << ODB_COMPILER_VERSION_STR << '\'' << endl; + << "odb.checksum = [string] '" << ODB_COMPILER_VERSION_STR << '\'' << endl + << "odb.environment = [strings] CPATH CPLUS_INCLUDE_PATH GCC_EXEC_PREFIX COMPILER_PATH" << endl; return 0; } -- cgit v1.1