mirror of
https://github.com/ldc-developers/ldc.git
synced 2025-05-14 15:16:07 +03:00
support CC envvar to be in the form "command args..." (#4582)
In case CC is set try to split it by spaces into a command and arguments. This is the same behaviour as in dmd. Signed-off-by: Andrei Horodniceanu <a.horodniceanu@proton.me>
This commit is contained in:
parent
17074a4422
commit
d7f87811f6
6 changed files with 45 additions and 11 deletions
|
@ -847,11 +847,11 @@ int linkObjToBinaryGcc(llvm::StringRef outputPath,
|
|||
std::string tool;
|
||||
std::unique_ptr<ArgsBuilder> argsBuilder;
|
||||
if (global.params.targetTriple->isOSBinFormatWasm()) {
|
||||
tool = getProgram("wasm-ld", &opts::linker);
|
||||
argsBuilder = std::make_unique<LdArgsBuilder>();
|
||||
tool = getProgram("wasm-ld", &opts::linker);
|
||||
} else {
|
||||
tool = getGcc();
|
||||
argsBuilder = std::make_unique<ArgsBuilder>();
|
||||
tool = getGcc(argsBuilder->args);
|
||||
}
|
||||
|
||||
// build arguments
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue