diff options
author | John Hodge <tpg@mutabah.net> | 2018-08-04 15:36:30 +0800 |
---|---|---|
committer | John Hodge <tpg@ucc.asn.au> | 2018-08-04 21:01:40 +0800 |
commit | bbc7c0b43c74383dcbaa14bb6550e0efc2d96ae3 (patch) | |
tree | ebdb654baf3514552dc4b0d5171cad94d84e4ecf /tools/minicargo/build.cpp | |
parent | 5d4bf9e96d795623f1b32b2f1f2e57c4f74419fe (diff) | |
download | mrust-bbc7c0b43c74383dcbaa14bb6550e0efc2d96ae3.tar.gz |
Minicargo - Always print called processes
Diffstat (limited to 'tools/minicargo/build.cpp')
-rw-r--r-- | tools/minicargo/build.cpp | 32 |
1 files changed, 25 insertions, 7 deletions
diff --git a/tools/minicargo/build.cpp b/tools/minicargo/build.cpp index ea93a793..2f8fafe4 100644 --- a/tools/minicargo/build.cpp +++ b/tools/minicargo/build.cpp @@ -940,10 +940,18 @@ bool Builder::spawn_process(const char* exe_name, const StringList& args, const ::std::stringstream cmdline; cmdline << exe_name; for (const auto& arg : args.get_vec()) + // TODO: Escaping cmdline << " " << arg; auto cmdline_str = cmdline.str(); - DEBUG("Calling " << cmdline_str); - + if(true) + { + ::std::cout << "> " << cmdline_str << ::std::end;; + } + else + { + DEBUG("Calling " << cmdline_str); + } + #if 0 // TODO: Determine required minimal environment, to avoid importing the entire caller environment ::std::stringstream environ_str; @@ -1005,12 +1013,22 @@ bool Builder::spawn_process(const char* exe_name, const StringList& args, const // Generate `argv` auto argv = args.get_vec(); argv.insert(argv.begin(), exe_name); - //DEBUG("Calling " << argv); - Debug_Print([&](auto& os){ - os << "Calling"; + + if(true) + { + ::std::cout << ">"; for(const auto& p : argv) - os << " " << p; - }); + ::std::cout << " " << p; + ::std::cout << ::std::endl; + } + else + { + Debug_Print([&](auto& os){ + os << "Calling"; + for(const auto& p : argv) + os << " " << p; + }); + } DEBUG("Environment " << env); argv.push_back(nullptr); |