[PATCH] D45217: [ThinLTO] Pass -save-temps to LTO backend for distributed ThinLTO builds
Peter Collingbourne via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Thu Apr 12 14:40:36 PDT 2018
pcc added inline comments.
================
Comment at: include/clang/Driver/Options.td:2255
HelpText<"Save intermediate compilation results.">;
-def save_temps : Flag<["-", "--"], "save-temps">, Flags<[DriverOption]>,
+def save_temps : Flag<["-", "--"], "save-temps">, Flags<[CC1Option, DriverOption]>,
Alias<save_temps_EQ>, AliasArgs<["cwd"]>,
----------------
This is still just a DriverOption, right?
================
Comment at: lib/Frontend/CompilerInvocation.cpp:747
+ .Case("obj", FrontendOpts.OutputFile)
+ .Default("./" +
+ llvm::sys::path::filename(FrontendOpts.OutputFile).str());
----------------
Why do you need the `"./"` part?
================
Comment at: test/CodeGen/thinlto_backend.ll:30
; Ensure f2 was imported
-; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc
+; RUN: %clang -target x86_64-unknown-linux-gnu -O2 -o %t3.o -x ir %t1.o -c -fthinlto-index=%t.thinlto.bc -save-temps=obj
; RUN: llvm-nm %t3.o | FileCheck --check-prefix=CHECK-OBJ %s
----------------
Should there be another test for `-save-temps=cwd`?
Repository:
rC Clang
https://reviews.llvm.org/D45217
More information about the cfe-commits
mailing list