[PATCH] D127778: [LTO][ELF] Add selective --save-temps= option

Jin Xin Ng via Phabricator via llvm-commits llvm-commits at lists.llvm.org
Thu Jun 30 12:56:51 PDT 2022


Northbadge added inline comments.


================
Comment at: lld/test/ELF/lto/save-temps-eq.ll:18
+;; Check precedence if both --save-temps and --save-temps= are present
+; RUN: ld.lld main.o thin1.o --save-temps=preopt --save-temps --save-temps=\opt -o %t/all2/a.out
+; RUN: cmp %t/all2/a.out %t/all/a.out
----------------
MaskRay wrote:
> `\opt` caused a Windows failure: https://buildkite.com/llvm-project/premerge-checks/builds/100428#0181b59c-9093-413f-bee2-39f2a6364181
> 
> `--save-temps=opt`
> 
> POSIX.1-2008 says:
> 
> `A <backslash> that is not quoted shall preserve the literal value of the following character, with the exception of a <newline>.`
> 
> therefore `\opt` is interpreted as `opt`. But Windows doesn't seem to do this.
Aha, was running into an issue with plain `opt` being translated/preprocessed to the full path of `opt` (the executable) , so it called `--save-temps=/path/to/opt`. Will see what I can do about it


Repository:
  rG LLVM Github Monorepo

CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D127778/new/

https://reviews.llvm.org/D127778



More information about the llvm-commits mailing list