From 2c0a2b0d688b4450c72cde12ecedaa3fc3c9662a Mon Sep 17 00:00:00 2001 From: Boris Kolpackov Date: Mon, 24 Oct 2016 16:13:26 +0200 Subject: Add build.driver variable with build system driver path (argv[0]) --- build2/utility.cxx | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'build2/utility.cxx') diff --git a/build2/utility.cxx b/build2/utility.cxx index ca6b239..4b68edb 100644 --- a/build2/utility.cxx +++ b/build2/utility.cxx @@ -89,6 +89,7 @@ namespace build2 return l; } + path argv0; dir_path work; dir_path home; const dir_path* relative_base = &work; @@ -505,8 +506,10 @@ namespace build2 bool exception_unwinding_dtor = false; void - init (uint16_t v) + init (const char* a0, uint16_t v) { + argv0 = path (a0); + // Diagnostics verbosity. // verb = v; -- cgit v1.1