diff options
author | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-01-30 16:07:49 +0100 |
---|---|---|
committer | Klaus Aehlig <klaus.aehlig@huawei.com> | 2024-01-31 10:20:01 +0100 |
commit | 8a4a900f93a704f18d5489b682508840a8cda179 (patch) | |
tree | 08dbac7941e596c8ab5a3eae2808fc8c4bee8d25 /src/other_tools/just_mr/rc.cpp | |
parent | e2168c51eb9d29542b32aaf7bca24595d0745749 (diff) | |
download | justbuild-8a4a900f93a704f18d5489b682508840a8cda179.tar.gz |
just-mrrc: support remote-execution properties
While just-mr does not use remote-execution properties, it is
still useful to have those as a separate entry in the rc file. With
rc-file delegation, this gives committed rc files an easy way to
specify the image to be used without having to set all the remaining
arguments for the various just subcommands in "just args".
Diffstat (limited to 'src/other_tools/just_mr/rc.cpp')
-rw-r--r-- | src/other_tools/just_mr/rc.cpp | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/src/other_tools/just_mr/rc.cpp b/src/other_tools/just_mr/rc.cpp index 209e4be6..8985c958 100644 --- a/src/other_tools/just_mr/rc.cpp +++ b/src/other_tools/just_mr/rc.cpp @@ -359,6 +359,30 @@ namespace { clargs->just_cmd.just_args[cmd_name] = std::move(args); } } + // read remote-execution properties, used for extending the launch + // command-line (not settable on just-mr's command line). + auto re_props = rc_config["remote-execution properties"]; + if (re_props.IsNotNull()) { + if (not re_props->IsList()) { + Logger::Log(LogLevel::Error, + "Configuration-file provided remote-execution " + "properties have to be a list of strings, but found {}", + re_props->ToString()); + std::exit(kExitConfigError); + } + for (auto const& entry : re_props->List()) { + if (not entry->IsString()) { + Logger::Log( + LogLevel::Error, + "Configuration-file provided remote-execution properties " + "have to be a list of strings, but found entry {}", + entry->ToString()); + std::exit(kExitConfigError); + } + clargs->launch_fwd.remote_execution_properties.emplace_back( + entry->String()); + } + } // read default for local launcher if (not clargs->common.local_launcher) { auto launcher = rc_config["local launcher"]; |