diff options
author | Alexey Bader <alexey.bader@intel.com> | 2025-10-15 13:46:39 -0700 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-10-15 13:46:39 -0700 |
commit | 4a44f03271246d64bee4edd8bcaf47f06db76475 (patch) | |
tree | 5725d97ff9a1465ff7b731f86ec75482bb4d0a33 /clang/lib/Frontend/CompilerInvocation.cpp | |
parent | 995eb4ca2ee15daffcc5a20121de955a0e2ca023 (diff) | |
download | llvm-4a44f03271246d64bee4edd8bcaf47f06db76475.zip llvm-4a44f03271246d64bee4edd8bcaf47f06db76475.tar.gz llvm-4a44f03271246d64bee4edd8bcaf47f06db76475.tar.bz2 |
[Clang][LTO] Fix use of funified-lto and save-temps flags together (#162763)
> clang -flto -funified-lto -save-temps test.c
Fails with the following error message:
```bash
module flag identifiers must be unique (or of 'require' type)
!"UnifiedLTO"
fatal error: error in backend: Broken module found, compilation aborted!
clang: error: clang frontend command failed with exit code 70 (use -v to see invocation)
```
Here is what the driver does when `-save-temps` flag is set:
> clang -flto -funified-lto -save-temps test.c -ccc-print-phases
> +- 0: input, "test.c", c
> +- 1: preprocessor, {0}, cpp-output
> +- 2: compiler, {1}, ir
> +- 3: backend, {2}, lto-bc
> 4: linker, {3}, image
The IR output of "compiler" step has "UnifiedLTO" module flag. "backend"
step adds another module flag with "UnifiedLTO" identifier, which
invalidates the LLVM IR module.
Diffstat (limited to 'clang/lib/Frontend/CompilerInvocation.cpp')
0 files changed, 0 insertions, 0 deletions