D99501-ignore-lto-auto
authorLLVM Packaging Team <pkg-llvm-team@lists.alioth.debian.org>
Tue, 28 Sep 2021 10:06:50 +0000 (11:06 +0100)
committerGianfranco Costamagna <locutusofborg@debian.org>
Tue, 28 Sep 2021 10:06:50 +0000 (11:06 +0100)
===================================================================

Gbp-Pq: Name D99501-ignore-lto-auto.diff

clang/include/clang/Driver/Driver.h
clang/lib/Driver/Driver.cpp

index dc18f1314f81e662666714e303a971db64dc1668..ee4e4fd6cba997c33c52dcfa5d229365c2cc1e08 100644 (file)
@@ -51,7 +51,8 @@ enum LTOKind {
   LTOK_None,
   LTOK_Full,
   LTOK_Thin,
-  LTOK_Unknown
+  LTOK_Unknown,
+  LTOK_Ignored
 };
 
 /// Driver - Encapsulate logic for constructing compilation processes
index ece8222dcf24f2dcb488a2c413c7b098446fb9ec..2b23daf46e67d479b74aee6ccc8831442152dbfa 100644 (file)
@@ -596,9 +596,12 @@ void Driver::setLTOMode(const llvm::opt::ArgList &Args) {
   LTOMode = llvm::StringSwitch<LTOKind>(LTOName)
                 .Case("full", LTOK_Full)
                 .Case("thin", LTOK_Thin)
+                .Case("auto", LTOK_Ignored)
+                .Case("jobserver", LTOK_Ignored)
                 .Default(LTOK_Unknown);
 
   if (LTOMode == LTOK_Unknown) {
+    // FIXME: check if argument is a number, then ignore, or handle it
     assert(A);
     Diag(diag::err_drv_unsupported_option_argument) << A->getOption().getName()
                                                     << A->getValue();