[PATCH] D64458: add -fthinlto-index= option to clang-cl
Bob Haarman via Phabricator via cfe-commits
cfe-commits at lists.llvm.org
Mon Jul 15 14:10:10 PDT 2019
inglorion updated this revision to Diff 209954.
inglorion added a comment.
Simplified after rebasing on top of r366127.
Repository:
rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
https://reviews.llvm.org/D64458/new/
https://reviews.llvm.org/D64458
Files:
clang/include/clang/Driver/Options.td
clang/test/Driver/cl-thinlto-backend.c
Index: clang/test/Driver/cl-thinlto-backend.c
===================================================================
--- /dev/null
+++ clang/test/Driver/cl-thinlto-backend.c
@@ -0,0 +1,9 @@
+// RUN: %clang_cl -c -flto=thin -Fo%t.obj %s
+// RUN: llvm-lto2 run -thinlto-distributed-indexes -o %t.exe %t.obj
+
+// -fthinlto_index should be passed to cc1
+// RUN: %clang_cl -### -c -fthinlto-index=%t.thinlto.bc -Fo%t1.obj \
+// RUN: %t.obj 2>&1 | FileCheck %s
+
+// CHECK: -fthinlto-index=
+// CHECK: "-x" "ir"
Index: clang/include/clang/Driver/Options.td
===================================================================
--- clang/include/clang/Driver/Options.td
+++ clang/include/clang/Driver/Options.td
@@ -1270,7 +1270,7 @@
"of 0 means the number of threads will be derived from "
"the number of CPUs detected)">;
def fthinlto_index_EQ : Joined<["-"], "fthinlto-index=">,
- Flags<[CC1Option]>, Group<f_Group>,
+ Flags<[CoreOption, CC1Option]>, Group<f_Group>,
HelpText<"Perform ThinLTO importing using provided function summary index">;
def fmacro_backtrace_limit_EQ : Joined<["-"], "fmacro-backtrace-limit=">,
Group<f_Group>, Flags<[DriverOption, CoreOption]>;
-------------- next part --------------
A non-text attachment was scrubbed...
Name: D64458.209954.patch
Type: text/x-patch
Size: 1230 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/cfe-commits/attachments/20190715/e029ea4b/attachment.bin>
More information about the cfe-commits
mailing list